Merge pull request #227 from cuu/master

RUNEVT RUNSYS dirname strip and split space
This commit is contained in:
GNU 2019-06-24 19:47:46 +08:00 committed by GitHub
commit 457adc1b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,7 +343,8 @@ def event_process(event,main_screen):
pygame.quit()
gobject_main_loop.quit()
os.chdir( GetExePath())
exec_app_cmd = "cd "+os.path.dirname(event.message)+";"
exec_app_cmd = "cd "+os.path.dirname(event.message.strip().split(" ")[0])+";"
exec_app_cmd += event.message
exec_app_cmd += "; sync & cd "+GetExePath()+"; exec python "+myscriptname
print(exec_app_cmd)
@ -362,7 +363,7 @@ def event_process(event,main_screen):
pygame.quit()
gobject_main_loop.quit()
os.chdir( GetExePath())
exec_app_cmd = "cd "+os.path.dirname(event.message)+";"
exec_app_cmd = "cd "+os.path.dirname(event.message.strip().split(" ")[0])+";"
exec_app_cmd += event.message
exec_app_cmd += "; sync & cd "+GetExePath()+"; exec python "+myscriptname
print(exec_app_cmd)