mirror of
https://github.com/defparam/smuggler
synced 2024-11-14 16:05:05 +00:00
fixed an issue with resolving config files when smuggler.py is executed via a symbolic link
This commit is contained in:
parent
2d6930e1bc
commit
bdf9ccf08e
7
smuggler.py
Normal file → Executable file
7
smuggler.py
Normal file → Executable file
@ -131,7 +131,12 @@ class Desyncr():
|
||||
return
|
||||
|
||||
if (self._configfile[1] != '/'):
|
||||
self._configfile = os.path.dirname(os.path.abspath(__file__)) + "/configs/" + self._configfile
|
||||
abspath = os.path.abspath(__file__)
|
||||
if (os.path.islink(abspath)):
|
||||
curpath = os.path.dirname(os.readlink(abspath))
|
||||
else:
|
||||
curpath = os.path.dirname(os.path.abspath(__file__))
|
||||
self._configfile = curpath + "/configs/" + self._configfile
|
||||
|
||||
try:
|
||||
f = open(self._configfile)
|
||||
|
Loading…
Reference in New Issue
Block a user