Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not properly following the XDG Base Directory Specification #221

Closed
3 tasks
pschichtel opened this issue Dec 29, 2024 · 2 comments
Closed
3 tasks

Not properly following the XDG Base Directory Specification #221

pschichtel opened this issue Dec 29, 2024 · 2 comments
Labels
Bug Something isn't working Duplicate This issue or pull request already exists

Comments

@pschichtel
Copy link

What happened?

The XDG base dir spec wants applications to first lookup XDG_DATA_HOME and only if that is not set, should applications assume its default value of $HOME/.local/share. Currently, Grayjay hardcodes $HOME/.local/share. Grayjay also attempts using $HOME/.config, which is not the right place for the kind of data Grayjay is storing there.

Please have a look at https://specifications.freedesktop.org/basedir-spec/latest/

Grayjay Version

3

What plugins are you seeing the problem on?

Other

Plugin Version

No response

Which operating system are you using?

Linux

When do you experience the issue?

  • While logged in
  • While logged out
  • N/A

Are you using a VPN?

No

Relevant log output

No response

@pschichtel pschichtel added the Bug Something isn't working label Dec 29, 2024
@mloveys
Copy link

mloveys commented Dec 29, 2024

Duplicate of #63

@Zvonimir-FUTO Zvonimir-FUTO added the Duplicate This issue or pull request already exists label Jan 3, 2025
@MoralCode
Copy link

MoralCode commented Mar 2, 2025

Per the comments in the issue i mentioned above, I believe this should be re-opened.

To summarize: The desktop app still contains file operations that dont fully respect/dont explicitly specify what directory they are meant to be in, leading the C# API's involved to make assumptions that break the app in the context of #14 .

Examples of file IO operations that i have seen that illustrate the problem:

  • the "launch" file - this is supposed to be in the user data directory
  • the wwwroot directory and grayjay.png file - these are part of the installation folder and (i assume) are okay to be read-only

all of these calls use APIs like GetFullPath, or WriteAllText, which seem to make assumptions that the current working directory should be used if a relative path or filename is given.

As you can see in the examples above, this assumption causes file access problems regardless of if the app is run from the installation directory (which is read only for flatpaks) or the user data directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants