Skip to content

Commit 7a8fb6c

Browse files
committed
cinnamon-settings themes: Check both new and legacy theme folders
when uninstalling. Fix a gsettings warning also (themes don't have an -enabled setting). Fixes #11336.
1 parent 100958d commit 7a8fb6c

File tree

1 file changed

+5
-1
lines changed
  • files/usr/share/cinnamon/cinnamon-settings/bin

1 file changed

+5
-1
lines changed

files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,8 @@ def _uninstall(self, job):
706706
shutil.rmtree(os.path.join(settings_dir, uuid))
707707
if os.path.exists(os.path.join(old_settings_dir, uuid)):
708708
shutil.rmtree(os.path.join(old_settings_dir, uuid))
709-
shutil.rmtree(os.path.join(self.install_folder, uuid))
709+
for folder in self.spices_directories:
710+
shutil.rmtree(os.path.join(folder, uuid), ignore_errors=True)
710711
except Exception as detail:
711712
self.errorMessage(_("A problem occurred while removing %s.") % job['uuid'], str(detail))
712713

@@ -776,6 +777,9 @@ def enable_extension(self, uuid, panel=1, box='right', position=0):
776777
self.settings.set_strv(self.enabled_key, enabled)
777778

778779
def disable_extension(self, uuid):
780+
if self.themes:
781+
return
782+
779783
enabled_extensions = self.settings.get_strv(self.enabled_key)
780784
new_list = []
781785
for enabled_extension in enabled_extensions:

0 commit comments

Comments
 (0)