GNOME Bugzilla – Bug 142806
Common version creation code with error check
Last modified: 2010-06-25 14:48:57 UTC
We need to handle the case where you are creating a modified version and the filename already exsists.
Created attachment 50922 [details] [review] Presents a dialog, as well as updates menu's Presents a dialog window when an error occurs during rename, create or delete. In addition it also fixes a fault with Version names not beein updated in the menu system when versions are beeing added, renamed or deleted.
Created attachment 50983 [details] [review] Updated patch This patch only presents a dialog if something goes wrong. For the problem with updating the menu's, please check bug http://bugzilla.gnome.org/attachment.cgi?bugid=313850
The solution to this needs to be more general we create versions on every edit of the original file as well, so they need to be protected. So to really fix this the version creation code for the edits also needs to be centralized then we need to handle the exception.
Also on a file system with versioning support, integrate nicely into that. For non-versioning file systems, maybe tar up the old versions or throw them in an "Old Versions" folder? 2 nasty ideas, but how do you deal with it? Tagging a number on the end of the filename is just shit because they show up in Nautilus etc. all over.
Committed this patch, I'm leaving the bug open for not based on my previous comments.
To my embarrasment, there seems to be some missing quotation marks (") in this patch :( Observe the last " The exception string should look like this ("Received exception \"{0}\". Unable to create version to \"{1}\"") ("Received exception \"{0}\". Unable to delete version to \"{1}\"") ("Received exception \"{0}\". Unable to rename version to \"{1}\"")
yeah I saw your mail after I'd already fixed this :)
Changed title to reflect new situation.
another problem related to this: # 343575
*** Bug 343575 has been marked as a duplicate of this bug. ***