-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Wrong way to look up Documents dir on Linux #553
Comments
well that makes it kinda useless. for storing documents the "config" dir is wrong, we dont want hidden configuration files here. |
so if I understood this right we need to basically:
|
That sounds correct. I found more info here: https://freedesktop.org/wiki/Software/xdg-user-dirs/
I don't know if there are such APIs or if they'll be useful to you. It seems like other projects implement it themselves, although on a closer look, JUCE assumes (I think the whole thing is stupid, but as a user I can either use the stupid thing to get what I want, or not get what I want...) |
both of those implementations don't bother to check for both seem to use an awful way for parsing, no error checking done at all besides checking if the folder exists... that at least makes it easier on our side, as the bar is quite low for a quick and dirty implementation |
Quick and dirty will do IMO. If the user has a malformed file, other things will break before they get to Cardinal. |
I think you can just exec |
yes, but exec within a plugin is frowned upon as it duplicates file descriptors and other things. |
It seems like Cardinal is looking for the env var
XDG_DOCUMENTS_DIR
:Cardinal/src/CardinalCommon.cpp
Lines 497 to 500 in a51cb46
XDG_DOCUMENTS_DIR
is not a known env var in the XDG basedir spec (unlike sayXDG_CONFIG_HOME
)I think this was mistakenly taken from
user-dirs.dirs(5)
.XDG_DOCUMENTS_DIR
is a variable only used inside the user-dirs.dirs file, not an env var. This file is meant to be sourced by shell scripts. I know of some programs (e.g. JUCE) parse this file to get the various user folders.The result is that Cardinal is looking in
~/Documents
, even though my documents folder is~/docs
:The text was updated successfully, but these errors were encountered: