Skip to content

Commit 56c5fad

Browse files
committed
Fix a bug with saving unencrypted periodic saving file
1 parent db5afdb commit 56c5fad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/archive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self):
4040

4141
def start_saving(self):
4242
cleanup_cache_dir()
43-
cmd = subprocess.run([sys.executable, "-m", "savedesktop.core.de_config", "--save"], check=True, env={**os.environ, "PYTHONPATH": f"{app_prefix}"})
43+
subprocess.run([sys.executable, "-m", "savedesktop.core.de_config", "--save"], check=True, env={**os.environ, "PYTHONPATH": f"{app_prefix}"})
4444

4545
# In the periodic saving mode, it's not allowed to save the
4646
# configuration without creating the archive
@@ -69,7 +69,7 @@ def _copy_config_to_folder(self):
6969
def _create_archive(self):
7070
password = get_password()
7171
cmd = ['7z', 'a', '-tzip', '-mx=3', '-x!*.zip', '-x!saving_status', 'cfg.sd.zip', '.']
72-
if settings["enable-encryption"] or os.path.exists(f"{CACHE}/pb"):
72+
if settings["enable-encryption"] or os.path.exists(f"{CACHE}/pb") and os.path.exists(f"{DATA}/password"):
7373
cmd.insert(4, "-mem=AES256")
7474
cmd.insert(5, f"-p{password}")
7575

0 commit comments

Comments
 (0)