From 6d19ada4e4c1306885e10fe735e2bea4d0ecbf15 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Sat, 25 Feb 2012 21:37:58 -0500 Subject: [PATCH] accept ~ in paths by calling os.path.expanduser() --- overviewer_core/settingsValidators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overviewer_core/settingsValidators.py b/overviewer_core/settingsValidators.py index 2cbeaaf..95a958d 100644 --- a/overviewer_core/settingsValidators.py +++ b/overviewer_core/settingsValidators.py @@ -45,7 +45,7 @@ def checkBadEscape(s): def validateWorldPath(worldpath): _, worldpath = checkBadEscape(worldpath) - abs_path = os.path.abspath(worldpath) + abs_path = os.path.abspath(os.path.expanduser(worldpath)) if not os.path.exists(os.path.join(abs_path, "level.dat")): raise ValidationException("No level.dat file in '%s'. Are you sure you have the right path?" % (abs_path,)) return abs_path