From 6b62959ba0e48a798e0fdfcc83078c4a9e60d8b6 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 23 Jun 2012 05:09:08 +0000 Subject: [PATCH] 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 --- gtk2_ardour/sfdb_freesound_mootcher.cc | 12 +++++++----- 1 file 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 #include @@ -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; + } } }