Closed YenForYang closed 3 years ago
In the first versions of the app, the data directory was stored in the application folder. For some reason, this led to a lot of issues with write access being denied to this folder once it was packaged with pyinstaller. The current system was a solution to this problem.
This portability issue has been raised a few times before, but I was unable to find a suitable solution. However, I had not considered being able to set the directory with a command-line flag. I really like this idea.
I will implement this for the next short-term release.
For some reason, this led to a lot of issues with write access being denied to this folder once it was packaged with pyinstaller.
This happens because in Windows, programs cannot write to the Program Files
folder without Administrator rights.
I'm hoping to make this app compatible with the Scoop package manager for Windows. However, this requires for the app to have a portable config. Possible solutions I'm thinking of:
--data-dir
or--config
that allows for manually specifying the data directory (overridingget_data_directory
).REDDIT_DOWNLOADER_CONFIG
) that overrides the default data directoryData
subdirectory in the application folder (which it looks likeget_data_directory
falls back to when it can't determine the OS). (Side note: it looks like there may be a typo in theget_data_directory
doc-- it says that it uses theData
directory by default on Linux (which it doesn't I believe. I think it uses~/.SomeGuySoftware/DownloaderForReddit
(or I may have misread it)).Data
subdirectory inside the application folder completely instead of checking for an application directory at all. https://github.com/MalloyDelacroix/DownloaderForReddit/blob/943f5cb6ce9f0a7844d9167003f0ad6b81926fba/DownloaderForReddit/utils/system_util.py#L132-L150Honestly I'm hoping you can do something similar for overriding
core.user_save_directory
andcore.subreddit_save_directory
inconfig.toml
, as it would make it much easier for scoop to handle persistent data