diff options
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/filesystem.cc | 10 | ||||
-rw-r--r-- | libs/pbd/pbd/filesystem.h | 3 |
2 files changed, 2 insertions, 11 deletions
diff --git a/libs/pbd/filesystem.cc b/libs/pbd/filesystem.cc index 7c76e5f053..558fc01227 100644 --- a/libs/pbd/filesystem.cc +++ b/libs/pbd/filesystem.cc @@ -64,15 +64,9 @@ path::operator/=(const char* rhs) } bool -is_directory (const path & p) -{ - return Glib::file_test (p.to_string(), Glib::FILE_TEST_IS_DIR); -} - -bool create_directory(const path & p) { - if(is_directory(p)) return false; + if (Glib::file_test (p.to_string(), Glib::FILE_TEST_IS_DIR)) return false; int error = g_mkdir (p.to_string().c_str(), S_IRWXU|S_IRWXG|S_IRWXO); @@ -86,7 +80,7 @@ create_directory(const path & p) bool create_directories(const path & p) { - if(is_directory(p)) return false; + if (Glib::file_test (p.to_string(), Glib::FILE_TEST_IS_DIR)) return false; int error = g_mkdir_with_parents (p.to_string().c_str(), S_IRWXU|S_IRWXG|S_IRWXO); diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h index 3a3c09e258..7985940452 100644 --- a/libs/pbd/pbd/filesystem.h +++ b/libs/pbd/pbd/filesystem.h @@ -103,9 +103,6 @@ public: inline path operator/ (const path& lhs, const path& rhs) { return path(lhs) /= rhs; } -/// @return true if path at p is a directory. -bool is_directory(const path & p); - /** * Attempt to create a directory at p as if by the glib function g_mkdir * with a second argument of S_IRWXU|S_IRWXG|S_IRWXO |