Page 1 of 1

[fixed] Bug: Open Backup doesn't recall backup file name

PostPosted: Saturday, 14.September 2013, 12:32
by Skinnytorus
To repro:
1. Open some file (file1)
2. Open backup of another file (file2)
3. See that the file name of the backup file is file1 (not file2) which is incorrect.

Re: Bug: Open Backup doesn't recall backup file name

PostPosted: Monday, 16.September 2013, 14:23
by ikam
In a way, this could be a correct behavior if you open a backup of the file1. It auto replace the filename, ready to save your doc with the last name.

In other way, It become inccorect if you open a backup of an other file that file1.

...

I can call the save as dialog just after to ask to rename the file, but it's quiet strange...

Re: Bug: Open Backup doesn't recall backup file name

PostPosted: Monday, 16.September 2013, 14:32
by Skinnytorus
Does wz save filename into the backup file? IMHO, on opening wz should read filename from the backup file (i.e. file2). There are lots of backup files in backup directory. Theoretically, you can choose to load any of them and not necessarily the last one. And the name of the backed up file and its name on load should be the same. Otherwise we have a mess..

Re: Bug: Open Backup doesn't recall backup file name

PostPosted: Monday, 16.September 2013, 14:48
by ikam
I think it was made like that to auto recover the last file. But not adapted to search an old backup, even if this is possible...
We can ever use open for that and search in the backup...

But I'm agree that if you open an old backup, it will reuse the filename of your previous file which is dangerous if you overwrite it...

Re: Bug: Open Backup doesn't recall backup file name

PostPosted: Monday, 16.September 2013, 14:52
by ikam
Ok, as it is dangerous, I will reuse the backup filename.

Re: Bug: Open Backup doesn't recall backup file name

PostPosted: Monday, 16.September 2013, 15:03
by Skinnytorus
Do you mean that you will use the actual filename for backup? I think the easiest way to do that is to add to filename something like "_bak#.wz4" on saving a backup copy of the file and then open it with its own filename (i.e. xyz_bak1.wz4). I think that would be sufficient to close the issue.

Re: Bug: Open Backup doesn't recall backup file name

PostPosted: Monday, 16.September 2013, 18:09
by Skinnytorus
Yeah. The commit works fine. I mark the topic done. Many thanks.