Skip to content

Commit a6d209c

Browse files
committed
Change a destination path of flatpak_installer.py
1 parent 4d1fa3d commit a6d209c

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/core/archive.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ def start_importing(self):
9191

9292
cleanup_cache_dir()
9393
self._check_config_type()
94-
9594
self._replace_home_in_files(".", home)
96-
subprocess.run([sys.executable, "-m", "savedesktop.core.config", "--import_"], check=True, env={**os.environ, "PYTHONPATH": f"{app_prefix}"})
95+
96+
cmd = subprocess.run([sys.executable, "-m", "savedesktop.core.config", "--import_"], check=True, capture_output=True, text=True, env={**os.environ, "PYTHONPATH": f"{app_prefix}"})
97+
print(cmd.stdout)
9798

9899
print("Configuration imported successfully.")
99100
remove_temp_file()

src/core/config.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,11 @@ def __init__(self):
212212

213213
# Create an autostart file to install Flatpaks from a list after the next login
214214
def create_flatpak_autostart(self):
215-
os.system(f"cp /app/share/savedesktop/savedesktop/core/flatpaks_installer.py {CACHE}/")
215+
os.system(f"cp /app/share/savedesktop/savedesktop/core/flatpaks_installer.py {CACHE}/workspace")
216216
if not os.path.exists(f"{DATA}/savedesktop-synchronization.sh"):
217-
if not os.path.exists(f"{home}/.config/autostart"):
218-
os.mkdir(f"{home}/.config/autostart")
219-
if not os.path.exists(f"{home}/.config/autostart/io.github.vikdevelop.SaveDesktop.Flatpak.desktop"):
220-
with open(f"{home}/.config/autostart/io.github.vikdevelop.SaveDesktop.Flatpak.desktop", "w") as fa:
221-
fa.write(f"[Desktop Entry]\nName=SaveDesktop (Flatpak Apps installer)\nType=Application\nExec=python3 {CACHE}/flatpaks_installer.py")
217+
os.makedirs(f"{home}/.config/autostart", exist_ok=True)
218+
with open(f"{home}/.config/autostart/io.github.vikdevelop.SaveDesktop.Flatpak.desktop", "w") as fa:
219+
fa.write(f"[Desktop Entry]\nName=SaveDesktop (Flatpak Apps installer)\nType=Application\nExec=python3 {CACHE}/workspace/flatpaks_installer.py")
222220

223221
if args.save:
224222
Save()

src/core/synchronization_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def set_up_auto_mount(mount_type):
8383

8484
synchronization_content = f'#!/usr/bin/bash\n{cmd}\nsleep 60s\n{sync_cmd}\n{periodic_saving_cmd}'
8585
if flatpak:
86-
synchronization_content += f'\npython3 {CACHE}/flatpaks_installer.py'
86+
synchronization_content += f'\npython3 {CACHE}/workspace/flatpaks_installer.py'
8787
with open(f"{DATA}/savedesktop-synchronization.sh", "w") as f:
8888
f.write(synchronization_content)
8989

0 commit comments

Comments
 (0)