0

Normalize paths to fix issues on Windows

This commit is contained in:
Andrew Chin
2012-02-17 21:16:47 -05:00
parent d669034c4c
commit ff6425d358

View File

@@ -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)