use realpath for config/logfile, allows symlinks to operate as expected.

pull/6/head
l3uddz 7 years ago
parent 3c48c53006
commit d95b34a907

@ -4,7 +4,7 @@ import sys
from attrdict import AttrDict
config_path = os.path.join(os.path.dirname(sys.argv[0]), 'config.json')
config_path = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'config.json')
base_config = {
'core': {
'debug': False

@ -30,7 +30,7 @@ class Logger:
if file_name:
if os.path.sep not in file_name:
# file_name was a filename, lets build a full file_path
self.log_file_path = os.path.join(os.path.dirname(sys.argv[0]), file_name)
self.log_file_path = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), file_name)
else:
self.log_file_path = file_name

Loading…
Cancel
Save