Skip to content

Commit

Permalink
allow portable mode
Browse files Browse the repository at this point in the history
  • Loading branch information
calendulish committed Jun 16, 2024
1 parent 89cf1d9 commit afbf039
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/steam_tools_ng/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@

parser = configparser.RawConfigParser()
log = logging.getLogger(__name__)
script_dir = Path(__file__).resolve().parent

if Path('src').is_dir():
# development mode
data_dir = Path('config')
if (script_dir / 'src').is_dir() or (script_dir / 'portable_mode.txt').is_file():
data_dir = script_dir / 'config'
elif hasattr(sys, 'frozen') or sys.platform == 'win32':
data_dir = Path(os.environ['LOCALAPPDATA'])
else:
Expand Down

0 comments on commit afbf039

Please sign in to comment.