fix: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) returns an empty string on some linux distro

* fallback the storage folder to `~/.sourcegit`
This commit is contained in:
leo 2024-08-12 21:29:18 +08:00
parent 9561f7ef64
commit 38665a61cb
No known key found for this signature in database
3 changed files with 20 additions and 9 deletions

View file

@ -45,11 +45,11 @@ You can download the latest stable from [Releases](https://github.com/sourcegit-
This software creates a folder `$"{System.Environment.SpecialFolder.ApplicationData}/SourceGit"`, which is platform-dependent, to store user settings, downloaded avatars and crash logs.
| OS | PATH |
|---------|-------------------------------------------------|
| Windows | `C:\Users\USER_NAME\AppData\Roaming\SourceGit` |
| Linux | `${HOME}/.config/SourceGit` |
| macOS | `${HOME}/Library/Application Support/SourceGit` |
| OS | PATH |
|---------|-----------------------------------------------------|
| Windows | `C:\Users\USER_NAME\AppData\Roaming\SourceGit` |
| Linux | `${HOME}/.config/SourceGit` or `${HOME}/.Sourcegit` |
| macOS | `${HOME}/Library/Application Support/SourceGit` |
For **Windows** users: