Skip to content

Commit

Permalink
Fix: Wrong error shown if gresource deleted after launching gdm-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
realmazharhussain committed Oct 15, 2023
1 parent 723e0fb commit 43bb1d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gdms/gresource.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ def extract_default_theme(destination:str, /):
if os.path.exists(destination):
shutil.rmtree(destination)

destination_shell_dir = os.path.join(destination, 'gnome-shell')
gresource_file = get_default()
resource_list = utils.get_stdout(["gresource", "list", env.HOST_ROOT + gresource_file]).splitlines()

if not gresource_file:
raise FileNotFoundError('No unmodified GResource file of the default shell theme was found')

destination_shell_dir = os.path.join(destination, 'gnome-shell')
resource_list = utils.get_stdout(["gresource", "list", env.HOST_ROOT + gresource_file]).splitlines()

for resource in resource_list:
filename = resource.removeprefix("/org/gnome/shell/theme/")
filepath = os.path.join(destination_shell_dir, filename)
Expand Down

0 comments on commit 43bb1d6

Please sign in to comment.