We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c26a57 commit d7eee54Copy full SHA for d7eee54
1 file changed
src/utility/paths.py
@@ -11,10 +11,16 @@ def get_app_data_dir():
11
Creates the directory if it doesn't exist.
12
"""
13
# Get the appropriate base directory for the platform
14
+
15
if platform.system() == "Darwin": # macOS
16
base_dir = os.path.expanduser("~/Library/Application Support/Oversee")
17
elif platform.system() == "Windows":
- 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')
24
else: # Linux and others
25
base_dir = os.path.expanduser("~/.oversee")
26
0 commit comments