Skip to content

Commit

Permalink
Add wildcard parsing for windows shell using glob.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fenixin committed Nov 7, 2021
1 parent b1fc8c2 commit d8b3b37
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions regionfixer_core/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,15 @@ def parse_paths(args):
RegionSet -- A RegionSet object with all the regionfiles found in args
"""

# windows shell doesn't parse wildcards, parse them here using glob
expanded_args = []
for arg in args:
earg = glob(arg)
# glob eats away any argument that doesn't match a file, keep those, they will be world folders
if earg: expanded_args.extend(earg)
else: expanded_args.append(arg)
args = expanded_args

# parese the list of region files and worlds paths
world_list = []
region_list = []
Expand Down

0 comments on commit d8b3b37

Please sign in to comment.