Skip to content

Commit

Permalink
Gracefully skip invalid local paths
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanC committed Nov 10, 2024
1 parent 572a123 commit 8e4200b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions salvage.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ def GetLocalFiles() -> dict[str, dict[str, str]]:
logger.trace(f"{pattern=}")

for file in directory.glob(pattern):
if file.is_dir():
logger.debug(f"Skipping path {file} due to being a directory")

continue

logger.trace(f"{file=}")

stack: str = file.relative_to("./stacks").parts[0]
Expand Down

0 comments on commit 8e4200b

Please sign in to comment.