From 727e1faf0103872f90dd0cd6ebef475e58c73b4b Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 23 Jun 2012 05:07:16 +0000 Subject: Use static string in ARDOUR::user_config_directory This code only needs to run once to determine/create users config directory git-svn-id: svn://localhost/ardour2/branches/3.0@12838 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/filesystem_paths.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libs/ardour/filesystem_paths.cc') diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index cd78397f3e..73bfaff137 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -39,7 +39,9 @@ using std::string; std::string user_config_directory () { - std::string p; + static std::string p; + + if (!p.empty()) return p; #ifdef __APPLE__ p = Glib::build_filename (Glib::get_home_dir(), "Library/Preferences"); -- cgit v1.2.3