From eefa9f4a5d916f438959804f0e72d24ad873816e Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Wed, 28 Oct 2020 22:04:11 +0000 Subject: [PATCH] Use relative path for state file locations. --- state_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/state_manager.py b/state_manager.py index 139bdaa..e81cffd 100644 --- a/state_manager.py +++ b/state_manager.py @@ -1,5 +1,6 @@ import json import os +from helpers.os_environment import resolve_external_file_path class StateManager: @@ -7,7 +8,7 @@ class StateManager: __state = {} def __init__(self, name, default_state=None): - self.filepath = "C:\Program Files\BAPSicle\state\\" + name + ".json" + self.filepath = resolve_external_file_path("/state/" + name + ".json") if not os.path.isfile(self.filepath): self.log("No file found for " + self.filepath) try: