fixed script directory sometime returning empty

This commit is contained in:
Nick Dyer 2021-05-30 00:34:07 -04:00
parent 05f7610057
commit 7743dc4319
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import os
import PyInstaller.__main__ import PyInstaller.__main__
import pocket_friends import pocket_friends
script_dir = os.path.dirname(__file__) script_dir = os.path.dirname(os.path.abspath(__file__))
PyInstaller.__main__.run([ PyInstaller.__main__.run([
'{0}/pocket_friends/__main__.py'.format(script_dir), '{0}/pocket_friends/__main__.py'.format(script_dir),

View File

@ -15,7 +15,7 @@ from ..hardware.gpio_handler import Constants, GPIOHandler
game_fps = 16 game_fps = 16
# Gets the directory of the script for importing and the save directory # Gets the directory of the script for importing and the save directory
script_dir = os.path.dirname(__file__) script_dir = os.path.dirname(os.path.abspath(__file__))
save_dir = os.path.join(Path.home(), '.pocket_friends') save_dir = os.path.join(Path.home(), '.pocket_friends')
# Tries to make the save directory. Does nothing if it already exists. # Tries to make the save directory. Does nothing if it already exists.