Skip to content

Conversation

@flipper
Copy link

@flipper flipper commented Feb 1, 2026

Cache should not be in the same directory as the configuration. It mostly only applies to linux.

See here for what each folder maps to https://xdg-net.github.io/Xdg.Directories/docs/defaults.html

@love-linger
Copy link
Collaborator

This app supports Portable Mode for Windows packages and Linux AppImages. Therefore, we need to store all files generated by SourceGit in a single directory.

@love-linger love-linger self-assigned this Feb 2, 2026
@love-linger
Copy link
Collaborator

Moreover, I believe that doing so will bring another benefit: when we want to delete SourceGit, we can be certain that all files generated by SourceGit can be easily deleted without any residues.

@love-linger love-linger added the not-planned It's not planned in the future label Feb 2, 2026
@flipper
Copy link
Author

flipper commented Feb 2, 2026

This app supports Portable Mode for Windows packages and Linux AppImages. Therefore, we need to store all files generated by SourceGit in a single directory.

Portable mode should still be supported is there anything I missed?

@flipper
Copy link
Author

flipper commented Feb 2, 2026

Moreover, I believe that doing so will bring another benefit: when we want to delete SourceGit, we can be certain that all files generated by SourceGit can be easily deleted without any residues.

Correct. When running on Mac or Windows everything is in a single directory.

But on Linux it is two folders. The cache does not belong next to configuration files.

love-linger added a commit that referenced this pull request Feb 2, 2026
…OME/SourceGit` on Linux (#2088)

Old datas will be migrated automatically

Signed-off-by: leo <longshuang@msn.cn>
love-linger added a commit that referenced this pull request Feb 2, 2026
…OME/SourceGit` on Linux (#2088)

Old datas will be migrated automatically

Signed-off-by: leo <longshuang@msn.cn>
@love-linger
Copy link
Collaborator

I've pushed a commit that moves data from $XDG_CONFIG_HOME/SourceGit or ~/.sourcegit to $XDG_DATA_HOME/SourceGit on Linux

@flipper
Copy link
Author

flipper commented Feb 2, 2026

I've pushed a commit that moves data from $XDG_CONFIG_HOME/SourceGit or ~/.sourcegit to $XDG_DATA_HOME/SourceGit on Linux

What else does source git store? It should be in .config if it's only configuration

@love-linger
Copy link
Collaborator

The files generated by SourceGit do not strictly distinguish between configuration files, cache data, solidified data, runtime process-related files, etc. All files generated by it are uniformly regarded as program data.

@flipper
Copy link
Author

flipper commented Feb 2, 2026

The files generated by SourceGit do not strictly distinguish between configuration files, cache data, solidified data, runtime process-related files, etc. All files generated by it are uniformly regarded as program data.

On Windows? Correct

But on Linux config files are in .config/appname
And cache files are in .cache/appname

@flipper
Copy link
Author

flipper commented Feb 2, 2026

I saw your commits you did that was basically what this PR is doing. But you are hardcoding the values of XDG dirs. They are env vars. Not static values.

@flipper flipper changed the base branch from master to develop February 2, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-planned It's not planned in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants