Skip to content

Commit d8b3b37

Browse files
committed
Add wildcard parsing for windows shell using glob.
1 parent b1fc8c2 commit d8b3b37

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

regionfixer_core/world.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,6 +1664,15 @@ def parse_paths(args):
16641664
RegionSet -- A RegionSet object with all the regionfiles found in args
16651665
"""
16661666

1667+
# windows shell doesn't parse wildcards, parse them here using glob
1668+
expanded_args = []
1669+
for arg in args:
1670+
earg = glob(arg)
1671+
# glob eats away any argument that doesn't match a file, keep those, they will be world folders
1672+
if earg: expanded_args.extend(earg)
1673+
else: expanded_args.append(arg)
1674+
args = expanded_args
1675+
16671676
# parese the list of region files and worlds paths
16681677
world_list = []
16691678
region_list = []

0 commit comments

Comments
 (0)