Skip to content

Commit

Permalink
change user data path to keep data between updates
Browse files Browse the repository at this point in the history
  • Loading branch information
LupaDevStudio committed Jan 5, 2024
1 parent 02281e5 commit a5564c5
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tools/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@
Module to store all the paths used for the app files and folders
"""

### Paths ###
###############
### Imports ###
###############

from kivy.utils import platform

#################
### Constants ###
#################

MOBILE_MODE = platform == "android"

if MOBILE_MODE:
from android.storage import app_storage_path # pylint: disable=import-error # type: ignore
PATH_APP_FOLDER = app_storage_path() + "/"
else:
PATH_APP_FOLDER = "./"

# Path for the folders
PATH_RESOURCES_FOLDER = "resources/"

# Path for the user data
PATH_USER_DATA = "data.json"
PATH_USER_DATA = PATH_APP_FOLDER + "data.json"

# Path for the screen
PATH_SCREENS = "screens/"
Expand Down

0 comments on commit a5564c5

Please sign in to comment.