Fixed single file execution
This commit is contained in:
parent
f43c5e3ed4
commit
33ec93e98e
2 changed files with 5 additions and 2 deletions
|
@ -26,7 +26,10 @@ if img == "":
|
||||||
img = img.replace("\\", "/")
|
img = img.replace("\\", "/")
|
||||||
img = img.replace("'", "\\'")
|
img = img.replace("'", "\\'")
|
||||||
|
|
||||||
exe_dir = path.dirname(path.realpath(sys.argv[0]))
|
if getattr( sys, 'frozen', False ) :
|
||||||
|
exe_dir = path.realpath(sys._MEIPASS)
|
||||||
|
else :
|
||||||
|
exe_dir = path.dirname(path.realpath(__file__))
|
||||||
os.chdir(exe_dir)
|
os.chdir(exe_dir)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue