diff --git a/libs/pbd/clear_dir.cc b/libs/pbd/clear_dir.cc index 1966605af6..3fa9b22334 100644 --- a/libs/pbd/clear_dir.cc +++ b/libs/pbd/clear_dir.cc @@ -5,6 +5,8 @@ #include #include +#include + #include "pbd/error.h" #include "pbd/compose.h" #include "pbd/clear_dir.h" @@ -35,12 +37,8 @@ PBD::clear_directory (const string& dir, size_t* size, vector* paths) continue; } - string fullpath; + string fullpath = Glib::build_filename (dir, dentry->d_name); - fullpath = dir; - fullpath += '/'; - fullpath += dentry->d_name; - if (::stat (fullpath.c_str(), &statbuf)) { continue; }