From: Mikko Rasa Date: Mon, 10 Nov 2014 17:32:54 +0000 (+0200) Subject: Deprecate the system directory accessors that take arguments X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=5c5ef91ab576f10288e2e3d027aa5c77bf8503a4 Deprecate the system directory accessors that take arguments They are fundamentally broken due to their dependence on cwd and $PATH, which may be changed after application startup. Now that Application stores an absolute argv0, the argument-less versions can provide a more consistent answer. Implementations for the functions are still the same, as they behave correctly when an absolute argv0 is passed in. At some point in the future I'll remove the old versions completely. --- diff --git a/source/fs/dir.h b/source/fs/dir.h index d62df8c..cf2cdeb 100644 --- a/source/fs/dir.h +++ b/source/fs/dir.h @@ -40,24 +40,28 @@ Path getcwd(); /// Returns the user's home directory Path get_home_dir(); -/// Returns a directory suitable for storing user-specific data +/// Deprecated. Use the argument-less version instead. Path get_user_data_dir(const std::string &appname); +/// Returns a directory suitable for storing user-specific data. Path get_user_data_dir(); -/// Returns a directory containing system-wide configuration +/// Deprecated. Use the argument-less version instead. Path get_sys_conf_dir(const std::string &argv0); +/// Returns a directory containing system-wide configuration. Path get_sys_conf_dir(); -/// Returns a directory containing immutable system-wide data +/// Deprecated. Use the argument-less version instead. Path get_sys_data_dir(const std::string &argv0, const std::string &appname); +/// Returns a directory containing immutable system-wide data. Path get_sys_data_dir(); -/// Returns a directory containing system-wide architecture-specific files +/// Deprecated. Use the argument-less version instead. Path get_sys_lib_dir(const std::string &argv0, const std::string &appname); +/// Returns a directory containing system-wide architecture-specific files. Path get_sys_lib_dir(); /// Changes the current working directory