1
Vote

HierarchyNode.SaveItem doesn't handle cancelling saving to a read-only file correctly.

description

Open a read-only file, make some changes. Now attempt to save the item. You'll get prompted that the file is read-only. Click cancel. SaveItem has a try/catch block and in the catch block it has a block commented as "Try to recover". But it shouldn't try to recover if the user cancelled the save.

comments

dinov wrote Feb 4, 2010 at 10:11 PM

I changed the Try to recover section to do:

if(ff != null && cancelled == 0)