Use relative path for state file locations.
This commit is contained in:
parent
4c11378ff2
commit
eefa9f4a5d
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue