Replace use of pbd/filesystem.h with Glib:: equivalents
authorTim Mayberry <mojofunk@gmail.com>
Sat, 23 Jun 2012 05:07:24 +0000 (05:07 +0000)
committerTim Mayberry <mojofunk@gmail.com>
Sat, 23 Jun 2012 05:07:24 +0000 (05:07 +0000)
There is also no need to try and create user_config_directory() as
calling it ensures it exists and is a valid directory

git-svn-id: svn://localhost/ardour2/branches/3.0@12842 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/rc_configuration.cc

index f0723d46ada23160fbeb5171cb78b2c8c28a111a..b72994fe51929f7df6d517eb8e4e37d670ab69ad 100644 (file)
@@ -142,20 +142,7 @@ RCConfiguration::load_state ()
 int
 RCConfiguration::save_state()
 {
-       try
-       {
-               sys::create_directories (user_config_directory ());
-       }
-       catch (const sys::filesystem_error& ex)
-       {
-               error << "Could not create user configuration directory" << endmsg;
-               return -1;
-       }
-
-       sys::path rcfile_path(user_config_directory());
-
-       rcfile_path /= "ardour.rc";
-       const string rcfile = rcfile_path.to_string();
+       const std::string rcfile = Glib::build_filename (user_config_directory(), "ardour.rc");
 
        // this test seems bogus?
        if (!rcfile.empty()) {