aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-11-30 20:47:13 +0100
committerKarel Kočí <cynerd@email.cz>2015-11-30 20:49:57 +0100
commit0f8439a2cfa89a12a4eeb147f213552f687dbe5c (patch)
tree972a43422aacc38b12e8a5eca3b9f866c57b2942
parent5134d5d9fffe09feda1f1c59e07993b1c60375c6 (diff)
downloadmcserver-wrapper-0f8439a2cfa89a12a4eeb147f213552f687dbe5c.tar.gz
mcserver-wrapper-0f8439a2cfa89a12a4eeb147f213552f687dbe5c.tar.bz2
mcserver-wrapper-0f8439a2cfa89a12a4eeb147f213552f687dbe5c.zip
Fix config files loading
Configuration wasn't loaded from some location, because it wasn't expanded from posix '~'.
-rwxr-xr-xmcwrapper4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcwrapper b/mcwrapper
index 57768c7..0a936fa 100755
--- a/mcwrapper
+++ b/mcwrapper
@@ -32,8 +32,8 @@ try:
except KeyError:
# Find configuration in predefined paths
for cf in __all_config_files__:
- if os.path.isfile(cf):
- __config_file__ = cf
+ if os.path.isfile(os.path.expanduser(cf)):
+ __config_file__ = os.path.expanduser(cf)
break
if __config_file__ == None: # If no configuration find. Set empty config
__set_empty_config__()