Remove duplicate factory defaults saving code in App

This commit is contained in:
David Robertson
2020-04-28 03:36:15 +01:00
parent e3ffa30518
commit 723e242c2b
3 changed files with 6 additions and 65 deletions

View File

@@ -753,6 +753,10 @@ class FlatCAMDefaults:
@classmethod
def save_factory_defaults_file(cls, file_path: str):
"""
Writes the factory defaults to a file at the given path, overwriting any existing file.
Sets the file to be read only.
"""
# Delete any existing factory defaults file
if os.path.isfile(file_path):
os.chmod(file_path, stat.S_IRWXO | stat.S_IWRITE | stat.S_IWGRP)