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

pull/54/head
l3uddz 7 years ago
parent f374ff9820
commit f74615c960

@ -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