Giter VIP home page Giter VIP logo

Comments (6)

monich avatar monich commented on August 29, 2024

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.

from harbour-foilauth.

progenyx avatar progenyx commented on August 29, 2024

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.

from harbour-foilauth.

monich avatar monich commented on August 29, 2024

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.

from harbour-foilauth.

progenyx avatar progenyx commented on August 29, 2024

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.

from harbour-foilauth.

monich avatar monich commented on August 29, 2024

~/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.

from harbour-foilauth.

ehdis avatar ehdis commented on August 29, 2024

... 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 ...

from harbour-foilauth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.