Skip to content

Commit

Permalink
Allow NSO-RPC to run in "Portable Mode"
Browse files Browse the repository at this point in the history
  • Loading branch information
HotaruBlaze committed Aug 11, 2023
1 parent 9c8774f commit 137b569
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@


def getAppPath():
# If "NSO-RPC_Data" folder exists, assume the user wants to run NSO-RPC in "Portable mode".
if os.path.isdir(os.path.join(os.getcwd(), 'NSO-RPC_Data')):
return os.path.join(os.getcwd(), 'NSO-RPC_Data')

applicationPath = os.path.expanduser('~/Documents/NSO-RPC')
# Windows allows you to move your UserProfile subfolders, Such as Documents, Videos, Music etc.
# However os.path.expanduser does not actually check and assumes its in the default location.
Expand Down

0 comments on commit 137b569

Please sign in to comment.