mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-03 10:44:18 +08:00
Merge branch 'feature-backup-manager' of https://github.com/Ultimaker/Cura into feature-backup-manager
* 'feature-backup-manager' of https://github.com/Ultimaker/Cura: Save settings before moving config file on Linux
This commit is contained in:
commit
2c896010c7
@ -43,6 +43,9 @@ class Backup:
|
||||
|
||||
Logger.log("d", "Creating backup for Cura %s, using folder %s", cura_release, version_data_dir)
|
||||
|
||||
# Ensure all current settings are saved.
|
||||
CuraApplication.getInstance().saveSettings()
|
||||
|
||||
# We copy the preferences file to the user data directory in Linux as it's in a different location there.
|
||||
# When restoring a backup on Linux, we move it back.
|
||||
if Platform.isLinux():
|
||||
@ -52,9 +55,6 @@ class Backup:
|
||||
Logger.log("d", "Copying preferences file from %s to %s", preferences_file, backup_preferences_file)
|
||||
shutil.copyfile(preferences_file, backup_preferences_file)
|
||||
|
||||
# Ensure all current settings are saved.
|
||||
CuraApplication.getInstance().saveSettings()
|
||||
|
||||
# Create an empty buffer and write the archive to it.
|
||||
buffer = io.BytesIO()
|
||||
archive = self._makeArchive(buffer, version_data_dir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user