From 5c5ef91ab576f10288e2e3d027aa5c77bf8503a4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 10 Nov 2014 19:32:54 +0200 Subject: [PATCH] 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. --- source/fs/dir.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 -- 2.45.2