whitequark / rust-xdg

A library that makes it easy to follow the X Desktop Group specifications
https://wiki.freedesktop.org/www/Specifications/
Apache License 2.0
154 stars 30 forks source link

Issue with XDG_RUNTIME_DIR check #15

Closed meh closed 7 years ago

meh commented 7 years ago

The environment variable is defined on my system but the directory doesn't actually exist, which makes BaseDirectories::new return an error.

Is this actually how it should be handled? I haven't had issues with programs that follow the XDG convention.

whitequark commented 7 years ago

Hm, a careful reading of the spec gives:

If, when attempting to write a file, the destination directory is non-existant an attempt should be made to create it with permission 0700.

So we should probably lazily create it (or return an error).

meh commented 7 years ago

Could you also publish the new version on crates.io please?

whitequark commented 7 years ago

Done