Skip to content

Commit f39e9e5

Browse files
committed
Fixed minor bugs
1 parent dd26c91 commit f39e9e5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/config.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,6 @@ def __init__(self):
545545
super().__init__()
546546
self.__revert_copies()
547547

548-
if DesktopEnvironment.get_current_de() == DesktopEnvironment.KDE_PLASMA:
549-
self.__kde_import_or_sync() # I don't know if this should be here, in setup or run function
550-
551548
def __revert_copies(self):
552549
"""
553550
Reverts the changes made to the configuration files and restores them to
@@ -605,11 +602,10 @@ def __create_xdg_path(grandparent: Path, path: Path) -> Path:
605602
:param path: The source path whose parent directory name and file name will be used
606603
to form the new path.
607604
:type path: Path
608-
:return: A new path combining `grandparent`, the parent directory name of `path`,
609-
and the name of `path`.
605+
:return: A new path combining `grandparent`, and the name of `path`.
610606
:rtype: Path
611607
"""
612-
return grandparent / path.parent.name / path.name
608+
return grandparent / path.name
613609

614610
def __kde_import_or_sync(self) -> None:
615611
"""
@@ -671,15 +667,17 @@ def run(self, max_workers: Optional[int] = None):
671667
672668
:return: None
673669
"""
670+
self.setup()
674671
self._parallel_copy(max_workers=max_workers)
672+
if DesktopEnvironment.get_current_de() == DesktopEnvironment.KDE_PLASMA:
673+
self.__kde_import_or_sync()
675674
if flatpak:
676675
if any(os.path.exists(path) for path in ["app", "installed_flatpaks.sh", "installed_user_flatpaks.sh"]):
677676
self.create_flatpak_desktop()
678677

679678
def teardown(self) -> None:
680679
pass
681680

682-
683681
if args.save:
684682
Save().run()
685683
elif args.import_:

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, and icon
21-
v = "3.6-hotfix"
21+
v = "3.6.1"
2222
icon = "io.github.vikdevelop.SaveDesktop"
23-
rel_notes = "<p>Fixed a \"buffer overflow\" error when creating configuration archives by replacing the ZIP utility with 7-Zip.</p>\
23+
rel_notes = "<p>Accelerated configuration saving/import using parallel copying (thanks to @ArthurValadares) and fixed minor bugs</p>\
24+
<p>3.6-hotfix</p><p>Fixed a \"buffer overflow\" error when creating configuration archives by replacing the ZIP utility with 7-Zip.</p>\
2425
<p>3.6</p><ul>\
2526
<li>Added an option to encrypt the periodic saving files and added support for its usage in the synchronization mode</li>\
2627
<li>Migrated from the *.sd.tar.gz to the *.sd.zip archive format, but for backward compatibility reasons, it will still be possible to select the first named archive format</li>\

src/main_window.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ def please_wait_save(self):
12331233
def cancel_save(w):
12341234
self.cancel_process = True
12351235
os.system(f"pkill -xf 'python3 {system_dir}/config.py --save'")
1236-
os.system(f"pkill tar") if not settings["enable-encryption"] else os.system("pkill zip")
1236+
os.system(f"pkill 7z")
12371237
self.toolbarview.set_content(self.headapp)
12381238
self.headerbar.set_title_widget(self.switcher_title)
12391239
self.switcher_bar.set_reveal(True if self.switcher_title.get_title_visible() else False)
@@ -1420,6 +1420,7 @@ def please_wait_import(self):
14201420
# Stop importing configuration
14211421
def cancel_import(w):
14221422
self.cancel_process = True
1423+
os.system("pkill 7z")
14231424
os.system(f"pkill -xf 'python3 {system_dir}/config.py --import_'")
14241425
self.toolbarview.set_content(self.headapp)
14251426
self.headerbar.set_title_widget(self.switcher_title)

0 commit comments

Comments
 (0)