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

Your paths shoud obey the FDO standard, and put files under XDG_DOCUMENTS_DIR, not ~/Documents #9

Open
progenyx opened this issue Sep 2, 2019 · 6 comments · May be fixed by #31
Open
Labels
wontfix This will not be worked on

Comments

@progenyx
Copy link

progenyx commented Sep 2, 2019

That goes for all your apps.

Cheerio!

@monich
Copy link
Owner

monich commented Sep 2, 2019

AFAICT, XDG_DOCUMENTS_DIR isn't set for Sailfish OS apps. Besides, when those are tested for compliance with Jolla Store rules, testers insist that ~/Documents is the place where data files should be stored.

In any case it is what it is, and moving the files isn't worth the trouble at this point, I think.

And since foil.key file is shared by all Foil apps - that one certainly isn't going anywhere.

@progenyx
Copy link
Author

progenyx commented Sep 4, 2019

Well, most apps, including Sailfish apps or more to the point, Jolla apps, obviously use the XDG user directories, because none of them has created a ~/Documents folder until now, but used the ones set by the user under ~/.config/user-dirs.dirs.

You should look into it more closely.

@monich
Copy link
Owner

monich commented Sep 5, 2019

Aha, I didn't know that we do have ~/.config/user-dirs.dirs on Sailfish OS. Anyway, it says XDG_DOCUMENTS_DIR="$HOME/Documents" so apparently I'm doing the right thing. It might make sense to use Qt or glib API to fetch that path instead of hardcoding it but functionally it won't change anything - data files will still go to ~/Documents.

@progenyx
Copy link
Author

XDG_DOCUMENTS_DIR="$HOME/Documents" is just the default value, and it's in no way the recommended one -- most users I know change those values first chance they get. You're right, using Qt for that does make more sense, as it's probably the way Jolla does it for their apps as well. And data files should go to whatever folder the user has set for documents, don't you think. Why have two folders for documents when you don't need to, its an additional nuisance.

@monich
Copy link
Owner

monich commented Sep 11, 2019

~/Documents/FoilAuth is not a directory where a user is supposed to drop arbitrary files and expect something reasonable to happen. It's a representation of app's internal data model - it could be e.g. an sqlite database or a single file or whatever, it's just a format that I chose. One user, one app, one model, one representation in the internal storage. I don't see any reason to complicate that, really. It's not a desktop where you can start multiple instances of the app, open different files in each instance, etc.

@ehdis
Copy link

ehdis commented Feb 7, 2020

... It's a representation of app's internal data model ...

XDG_DOCUMENTS_DIR is a "well known" user directory (https://www.freedesktop.org/wiki/Software/xdg-user-dirs/) therefore to not be in the way of the user I suggest ~/.config/foilauth/ (https://www.freedesktop.org/software/systemd/man/file-hierarchy.html). Maybe foil/foil.key should be placed also there, thought ...

@monich monich added the wontfix This will not be worked on label Mar 25, 2022
Arusekk added a commit to Arusekk/harbour-foilauth that referenced this issue Jun 19, 2022
In case the app were to get ported to other systems,
or if Sailfish added localized directory names (like desktop distros do)
or if anything similar were to happen.

Closes monich#9
@Arusekk Arusekk linked a pull request Jun 19, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants