summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_freesound_mootcher.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2012-06-23 05:09:08 +0000
committerTim Mayberry <mojofunk@gmail.com>2012-06-23 05:09:08 +0000
commit6b62959ba0e48a798e0fdfcc83078c4a9e60d8b6 (patch)
tree98f7ca4268ff295e8165f669761461d36de9a4e9 /gtk2_ardour/sfdb_freesound_mootcher.cc
parentaf0083b11d0285f8fd529262b66b287ae33d130a (diff)
Replace use of pbd/filesystem.h with Glib equivalent in Mootcher class
git-svn-id: svn://localhost/ardour2/branches/3.0@12886 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/sfdb_freesound_mootcher.cc')
-rw-r--r--gtk2_ardour/sfdb_freesound_mootcher.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc
index 70d04abb66..b0a4d90339 100644
--- a/gtk2_ardour/sfdb_freesound_mootcher.cc
+++ b/gtk2_ardour/sfdb_freesound_mootcher.cc
@@ -41,7 +41,7 @@
#include "sfdb_freesound_mootcher.h"
#include "pbd/xml++.h"
-#include "pbd/filesystem.h"
+#include "pbd/error.h"
#include <sys/stat.h>
#include <sys/types.h>
@@ -91,10 +91,12 @@ void Mootcher::changeWorkingDir(const char *saveLocation)
void Mootcher::ensureWorkingDir ()
{
- PBD::sys::path p = basePath;
- p /= "snd";
- if (!PBD::sys::is_directory (p)) {
- PBD::sys::create_directories (p);
+ std::string p = Glib::build_filename (basePath, "snd");
+
+ if (!Glib::file_test (p, Glib::FILE_TEST_IS_DIR)) {
+ if (g_mkdir_with_parents (p.c_str(), 0775) != 0) {
+ PBD::error << "Unable to create Mootcher working dir" << endmsg;
+ }
}
}