From ff6425d358c09559e31aa28c35cd06ce9760eaf3 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Fri, 17 Feb 2012 21:16:47 -0500 Subject: [PATCH] Normalize paths to fix issues on Windows --- overviewer_core/world.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index af0f240..07c7b90 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -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)