ccrma / miniAudicle

miniAudicle: integrated development + performance environment for the ChucK programming language
https://chuck.stanford.edu/
GNU General Public License v2.0
65 stars 9 forks source link

Minor bug when saving an example with "save as." #15

Closed spencersalazar closed 10 years ago

spencersalazar commented 10 years ago

From https://lists.cs.princeton.edu/pipermail/chuck-users/2013-October/007404.html:

Bug report: Note: this is low priority and minor, more in the category of an annoyance.

I opened an example then saved it with "save as." Then I edited it then tried to save the changes. A dialog reported the file was read only. I checked the file with info and the file has Read & Write permission. I can overwrite it with "Save As" but Save refuses to save. I suspect that the example was read only and it kept that attribute in some file state variable. If true this is wrong in two ways, first it should have updated the local state to match what it wrote and second it should not depend on historical information. Even if the file was read-only when opened that may have changed. This is a multitasking system and some other task (me in finder for example) might have changed the permissions since the file was opened. I believe the correct behavior would have been to attempt to write the file and check the error status of the write.

spencersalazar commented 10 years ago

Fixed in d975c361ee939014d8ddd076adaef8c2864c95e1