mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 18:45:53 +08:00
Merge branch 'master' into UMH-2021_ribbed_vaults_infill
This commit is contained in:
commit
17011e4991
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018 Ultimaker B.V.
|
# Copyright (c) 2021 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import io
|
import io
|
||||||
@ -168,7 +168,10 @@ class Backup:
|
|||||||
preferences_file = Resources.getPath(Resources.Preferences, "{}.cfg".format(preferences_file_name))
|
preferences_file = Resources.getPath(Resources.Preferences, "{}.cfg".format(preferences_file_name))
|
||||||
backup_preferences_file = os.path.join(version_data_dir, "{}.cfg".format(preferences_file_name))
|
backup_preferences_file = os.path.join(version_data_dir, "{}.cfg".format(preferences_file_name))
|
||||||
Logger.log("d", "Moving preferences file from %s to %s", backup_preferences_file, preferences_file)
|
Logger.log("d", "Moving preferences file from %s to %s", backup_preferences_file, preferences_file)
|
||||||
shutil.move(backup_preferences_file, preferences_file)
|
try:
|
||||||
|
shutil.move(backup_preferences_file, preferences_file)
|
||||||
|
except EnvironmentError as e:
|
||||||
|
Logger.error(f"Unable to back-up preferences file: {type(e)} - {str(e)}")
|
||||||
|
|
||||||
# Read the preferences from the newly restored configuration (or else the cached Preferences will override the restored ones)
|
# Read the preferences from the newly restored configuration (or else the cached Preferences will override the restored ones)
|
||||||
self._application.readPreferencesFromConfiguration()
|
self._application.readPreferencesFromConfiguration()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user