Added os.chdir() in ballistica_server.py

I realized the script couldn't be executed from other directories so I added the chdir function.
Now the script can be properly executed from anywhere.
If that was intended, feel free to reject the request. Also first pull request :)
This commit is contained in:
AwesomeLogic 2020-05-07 18:57:26 +05:30 committed by GitHub
parent 233a4a4f78
commit 864957742b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,10 @@ from threading import Thread, Lock, current_thread
from pathlib import Path
from typing import TYPE_CHECKING
# We change our working directory according to file's path
# so that the script can be properly executed from anywhere
os.chdir(os.path.abspath(os.path.dirname(__file__)))
# We make use of the bacommon and efro packages as well as site-packages
# included with our bundled Ballistica dist.
sys.path += [