Skip to content

Commit 34c09dc

Browse files
committed
Fix a bug with importing configuration from the archive
1 parent 5a7483c commit 34c09dc

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/localization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
r_lang = p_lang[:-3]
1919

2020
# Set application version, icon, and release notes
21-
v = "3.6.2"
21+
v = "3.6.2-hotfix"
2222
icon = "io.github.vikdevelop.SaveDesktop"
23-
rel_notes = "<ul>\
23+
rel_notes = "<p>Fixed a bug with importing configuration from the archive</p>\
24+
<p>3.6.2</p><ul>\
2425
<li>Fixed a bug with properly including extensions in the archive (#428)</li>\
2526
<li>Fixed a bug with importing a configuration from the folder</li>\
2627
<li>Fixed a bug with cancelling saving or importing configuration</li>\

src/main_window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,10 +1403,10 @@ def start_importing(self):
14031403
if ".sd.zip" in self.import_file:
14041404
try:
14051405
password = getattr(self.checkEntry, "get_text", lambda: None)()
1406-
except AttributeError:
1406+
except:
14071407
password = None
14081408

1409-
if password != None:
1409+
if password:
14101410
try:
14111411
subprocess.run(
14121412
['7z', 'e', '-so', f'-p{password}' if password else '', self.import_file, 'dconf-settings.ini'],

src/periodic_saving.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,17 @@ def get_password_from_file(self):
8787
except:
8888
self.password = None
8989
if self.password != None:
90-
os.system(f'7z a -tzip -mem=AES256 -mx=3 -p"{self.password}" -x!*.zip -x!saving_status cfg.sd.zip .')
90+
os.system(f'7z a -tzip -mx=6 -p"{self.password}" -x!*.zip -x!saving_status cfg.sd.zip .')
9191
else:
92-
os.system(f"7z a -tzip -mx=3 -x!*.zip -x!saving_status cfg.sd.zip .")
92+
os.system(f"7z a -tzip -mx=6 -x!*.zip -x!saving_status cfg.sd.zip .")
9393
shutil.copyfile('cfg.sd.zip', f'{self.pbfolder}/{self.filename}.sd.zip')
9494

9595
def save_last_backup_date(self):
9696
with open(f"{DATA}/periodic-saving.json", "w") as pb:
9797
json.dump({"last-saved": date.today().isoformat()}, pb)
9898

9999
def config_saved(self):
100-
os.chdir(CACHE)
101-
shutil.rmtree("periodic_saving")
100+
os.remove("saving_status")
102101
print("Configuration saved.")
103102
exit()
104103

0 commit comments

Comments
 (0)