Commit b6f498ee authored by Lorenz Steinert's avatar Lorenz Steinert

always return normpath

parent 71ee1c11
......@@ -327,12 +327,11 @@ def get_share(rundir, config=None, sharedir=None):
if os.path.isdir(config_share) and os.path.isabs(config_share):
return config['PROTOKOLL']['share']
elif os.path.isdir(os.path.join(rundir, '..', config_share)):
print(os.path.normpath(os.path.join(rundir, '..', config_share)))
return os.path.normpath(os.path.join(rundir, '..', config_share))
logging.warning(config_share + ': Not a Directory')
return Error.NO_DIR
elif os.path.isdir(os.path.join(rundir, '../share')):
return os.path.join(rundir, '../share')
return os.path.normpath(os.path.join(rundir, '../share'))
logging.warning('No share Directory found at '
+ os.path.abspath(os.path.join(rundir, '../share')))
return Error.NO_DEFAULT_DIR
......@@ -350,14 +349,13 @@ def get_path(rundir, config=None, path=None):
if os.path.isdir(config_path) and os.path.isabs(config_path):
return config_path
elif os.path.isdir(os.path.join(rundir, '..', config_path)):
print(os.path.normpath(os.path.join(rundir, '..', config_path)))
return os.path.normpath(os.path.join(rundir, '..', config_path))
logging.warning(config['PROTOKOLL']['path'] + ': Not a Directory')
return Error.NO_DIR
elif os.path.isdir(os.path.join(rundir, '../..')):
return os.path.join(rundir, '../..')
return os.path.normpath(os.path.join(rundir, '../..'))
logging.warning('No Protokoll Directory found at '
+ os.path.abspath(os.path.join(rundir, '../..')))
+ os.path.normpath(os.path.join(rundir, '../..')))
return Error.NO_DEFAULT_DIR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment