diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:07:16 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:07:16 +0000 |
commit | 727e1faf0103872f90dd0cd6ebef475e58c73b4b (patch) | |
tree | f6af2e42f34ec08bc343388e16b629b7312e1e06 /libs/ardour/filesystem_paths.cc | |
parent | a39990dee0dd6688ef45b29aa96595e71276a0c6 (diff) |
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
Diffstat (limited to 'libs/ardour/filesystem_paths.cc')
-rw-r--r-- | libs/ardour/filesystem_paths.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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"); |