Skip to content

Commit d7eee54

Browse files
attempt simple path fix to resolve issue 7
1 parent 2c26a57 commit d7eee54

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/utility/paths.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ def get_app_data_dir():
1111
Creates the directory if it doesn't exist.
1212
"""
1313
# Get the appropriate base directory for the platform
14+
1415
if platform.system() == "Darwin": # macOS
1516
base_dir = os.path.expanduser("~/Library/Application Support/Oversee")
1617
elif platform.system() == "Windows":
17-
base_dir = os.path.join(os.environ.get('APPDATA', ''), 'Oversee')
18+
# Use APPDATA if set, otherwise fallback to user's home directory
19+
appdata = os.environ.get('APPDATA')
20+
if appdata and os.path.isdir(appdata):
21+
base_dir = os.path.join(appdata, 'Oversee')
22+
else:
23+
base_dir = os.path.join(os.path.expanduser('~'), 'Oversee')
1824
else: # Linux and others
1925
base_dir = os.path.expanduser("~/.oversee")
2026

0 commit comments

Comments
 (0)