Normalize paths to fix issues on Windows
This commit is contained in:
@@ -255,11 +255,11 @@ class RegionSet(object):
|
||||
this regionset. Either "nether", "end" or "overworld"
|
||||
"""
|
||||
# path will be normalized in __init__
|
||||
if self.regiondir.endswith("/DIM-1/region"):
|
||||
if self.regiondir.endswith(os.path.normpath("/DIM-1/region")):
|
||||
return "nether"
|
||||
elif self.regiondir.endswith("/DIM1/region"):
|
||||
elif self.regiondir.endswith(os.path.normpath("/DIM1/region")):
|
||||
return "end"
|
||||
elif self.regiondir.endswith("/region"):
|
||||
elif self.regiondir.endswith(os.path.normpath("/region")):
|
||||
return "overworld"
|
||||
else:
|
||||
raise Exception("Woah, what kind of dimension is this! %r" % self.regiondir)
|
||||
|
||||
Reference in New Issue
Block a user