app-dirs-rs icon indicating copy to clipboard operation
app-dirs-rs copied to clipboard

get_app_dir creates directories despite the documentation saying otherwise

Open ghost opened this issue 6 years ago • 0 comments

The documentation for get_app_dir claims that it "[r]eturns (but does not create)" the path. However, its implementation calls get_root which does in fact create the path anyway. The other getters have similar problematic code.

This will create unexpected stray directories and/or fail when $HOME is not actually set to the user's home directory, such as when the environment has been cleared with env -i.

ghost avatar Dec 16 '18 17:12 ghost