You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
According to the documentation, the get_* functions should not touch the
file system while the functions without the get_ prefix create the
returned directory (and all parent directories).
But with the current implementation, the get_* functions do create
the data and app root directories if they don’t exist, see bug report
34 in the original repository:
andybarron/app-dirs-rs#34
This patch adds a test suite that demonstrates the problem.
robinkrahl
added a commit
to robinkrahl/app_dirs2
that referenced
this issue
Aug 2, 2020
According to their documentation, the get_app_root and get_app_dir
functions only return the requested directories and do not create them.
But the functions called the data_root and app_root functions that
create missing directories. See this bug report in the original
project:
andybarron/app-dirs-rs#34
This patch fixes this problem by calling get_data_root and get_app_root
instead.
The documentation for
get_app_dir
claims that it "[r]eturns (but does not create)" the path. However, its implementation callsget_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
.The text was updated successfully, but these errors were encountered: