As for the extra button, I actually thought that it makes sense in the general save dialogue, not only just for the plugin. For example, someone is locking my file. I don't know who it is or how to reach that person, but I need to save my work somehow. In a normal "save" dialogue, the pop up would occur, I would click OK, then go to "File" and "Save As..". If the popup dialogue already has a "Save As" button, it would more convenient to use.

As for my other two suggestions, implementing them would mean that the plugin would not use the normal "save file"-API, but has to implement a modified version. If this is not practical, a poor-man's solution would be, that the plugin would first check, whether file and directory have write permission, and only if they do, invoke the "save file" function. This is not a completely clean solution, because between checking the permissions and actually saving the file, there is a tiny time slot, during which the file might become locked. This should be very rare though.

Even then, it is easy to fix, I think: I guess the plugin is using some API function to save a file. One could extend this API by an additional parameter, which defines what to do in case of error: Show a pop-up, or return an error message to the caller (i.e. the plugin), which then handles the error in its own way.


Reply to this email directly or view it on GitHub.