- added Exception handing for the case when the user is trying to save & overwrite a file already opened in another file

This commit is contained in:
Marius Stanciu
2019-08-09 22:39:13 +03:00
parent 7a6c0541be
commit 6f526acb4d
5 changed files with 87 additions and 25 deletions

View File

@@ -1396,6 +1396,10 @@ class SolderPaste(FlatCAMTool):
except FileNotFoundError:
self.app.inform.emit(_("[WARNING_NOTCL] No such file or directory"))
return
except PermissionError:
self.app.inform.emit(_("[WARNING] Permission denied, saving not possible.\n"
"Most likely another app is holding the file open and not accessible."))
return 'fail'
if self.app.defaults["global_open_style"] is False:
self.app.file_opened.emit("gcode", filename)