Skip to content

Commit

Permalink
actions: Ignore miscellaneous files in the install folder.
Browse files Browse the repository at this point in the history
Nemo allows action helper scripts and other files to live in this
folder.
  • Loading branch information
mtwebster committed Dec 8, 2023
1 parent eff19d2 commit 21b8c3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ def _load_metadata(self):
subdirectory = os.path.join(file_path, uuid)
if uuid.endswith('.nemo_action'):
continue
# For actions, ignore any other normal files, an action may place other support scripts in here.
if self.actions and not os.path.isdir(subdirectory):
continue
try:
with open(f"{subdirectory}/metadata.json", encoding='utf-8') as json_data:
metadata = json.load(json_data)
Expand Down
3 changes: 3 additions & 0 deletions python3/cinnamon/harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ def _load_metadata(self):
subdirectory = os.path.join(directory, uuid)
if uuid.endswith('.nemo_action'):
continue
# For actions, ignore any other normal files, an action may place other support scripts in here.
if self.actions and not os.path.isdir(subdirectory):
continue
try:
with open(os.path.join(subdirectory, "metadata.json"), "r", encoding="utf-8") as f:
metadata = json.load(f)
Expand Down

0 comments on commit 21b8c3f

Please sign in to comment.