On 03/26/2010 02:12 PM, Pavel Sanda wrote:
Richard Heck wrote:
wouldnt be better this way
// Saving failed, so backup is not backup
if (madeBackup)
backupName.moveTo(d->filename);
+ d->filename.copyTo(d->backupName);
I'm a bit puzzled here. Why can't we just move the backup file back to
where it was and do nothing else? Is the thought that we ought to have a
backup? Having two copies of the file doesn't help much.
you are right, all other things look like overengineering.
attaching the fixed version.
Looks good to me.
rh