i have a Rhino file which is published with a PlugIn. The file is deliberately write protected, it acts as a template file. If a user opens the file directly (it is not placed in Rhino’s template folder), he can make changes and once he tries to save, he is prompted to use SaveAs. So far so good.
The problem is, the new saved file is still in read only mode, so if i tries to save again, he must save under a new name. If the user presses OK in above dialog, he gets this below error if he tries to overwrite the file which he already used SaveAs on:
Is this the expected behavior when working with write protected files ?
@tim and I did some work in the recent past regarding checking to see if a file was read-only or not when saving/opening. If I remember correctly it had to do with saving files in a Google Drive folder which would occasionally lock a file while syncing when Rhino was attempting to save. I have not tried what is mentioned above but if it is reproducible and seems wrong please log a bug and we can take a look.
Hi all, thank you for taking a closer look. I can repeat the following:
Open write protected file “test.3dm” (it is shown in the title that it is read only)
attempt to _Save, it (eventually*) gives warning to use _SaveAs and asks for a location
name it MyNewFile.3dm
now the “read only” hint is still shown in the title which reads “MyNewFile.3dm” so the saved file is still write protected. If you then hit _Save again, it prompts you another time to save under a different name, try to overwrite “MyNewFile.3dm”. Then you get the two dialogs posted above. I think if _SaveAs was used when first saving the new file, this should not be write protected again as it was saved under a new name.
@Pascal, no, i did not reopen “Junk2.3dm” as in your example.
(*) if Rhino is closed and you open a write protected file by double clicking it, you will not get any warning message when an attempt is made using _Save. Rhino just asks for a new location.
Hi @Pascal, it may have something to do with an outdated OS.
with Rhino closed, i can see a difference when double clicking a write protected file in V6 (Win) and V7 (Win). Using V6, i do not get a “Read only file” warning dialog when the file is opened, but i get this dialog in V7. It could be that on the System V6 runs on, i have someday checked the “Do not show this message again” checkbox.
Using V7 (Windows 10), if i choose to open as read only, it works flawless, once saved under a new name, this newly named file is not write protected anymore. I think it’s time to abandon V6 altogether.