Skip to content

Commit

Permalink
Found a issue with the CipherOS directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mas6y6 committed Dec 6, 2024
1 parent b9dc63c commit 023edd4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/automatic_cipheros_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
exclude:
- os: windows-latest
arch: arm64
- os: windows-latest
arch: x32
runs-on: ${{ matrix.os }}

steps:
Expand Down
23 changes: 14 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def printerror(msg):
def networkmap_save():
global networkmap
with open(
os.path.join(api.starterdir, "data", "cache", "networkmap.json"), "w"
os.path.join(api.starterdir,"CipherOS", "data", "cache", "networkmap.json"), "w"
) as f:
json.dump(networkmap, f, indent=4)
f.close()
Expand All @@ -184,18 +184,23 @@ def create_directories(path_list):
os.makedirs(path)

if not executeargs.startdir:
if platform.system() == "Windows":
api.pwd = os.path.expanduser("~")
roaming_folder = os.path.join(os.environ.get("APPDATA"))
create_directories([roaming_folder])
api.starterdir = roaming_folder
os.chdir(api.pwd)
if platform.system() == "Windows":
if is_running_in_program_files():
api.pwd = os.path.expanduser("~")
roaming_folder = os.path.join(os.environ.get("APPDATA"))
create_directories([roaming_folder])
api.starterdir = roaming_folder
os.chdir(api.pwd)
else:
roaming_folder = os.path.join(os.environ.get("APPDATA"))
create_directories([roaming_folder])
api.starterdir = roaming_folder
elif platform.system() == "Linux":
if not debugmode:
api.starterdir = os.path.join(os.path.expanduser("~"))
api.starterdir = os.path.expanduser("~")
elif platform.system() == "Darwin":
if not debugmode:
api.starterdir = os.path.join(os.path.expanduser("~"))
api.starterdir = os.path.expanduser("~")

if executeargs.startdir:
api.starterdir = executeargs.startdir
Expand Down

0 comments on commit 023edd4

Please sign in to comment.