Skip to content

Commit

Permalink
Escape _all_ glob.globs. Fixes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
brenthuisman committed Jan 29, 2024
1 parent ae275e6 commit 709f581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion par2deep/par2deep.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def check_state(self):
return 200
#if 200, then par2 doesnt exist.

allfiles = [f for f in glob.glob(os.path.join(self.directory,"**","*"), recursive=True) if os.path.isfile(f)] #not sure why required, but glob may introduce paths...
allfiles = [f for f in glob.glob(os.path.join(glob.escape(self.directory),"**","*"), recursive=True) if os.path.isfile(f)] #not sure why required, but glob may introduce paths...

if 'root' in self.excludes:
allfiles = [f for f in allfiles if os.path.dirname(f) != self.directory]
Expand Down

0 comments on commit 709f581

Please sign in to comment.