diff options
Diffstat (limited to 'libs/pbd/file_utils.cc')
-rw-r--r-- | libs/pbd/file_utils.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index 756bd24fe4..552012d227 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -229,16 +229,12 @@ void copy_files(const std::string & from_path, const std::string & to_dir) { PathScanner scanner; - vector<string*>* files = scanner (from_path, accept_all_files, 0, true, false); + vector<string> files = scanner (from_path, accept_all_files, 0, true, false); - if (files) { - for (vector<string*>::iterator i = files->begin(); i != files->end(); ++i) { - std::string from = Glib::build_filename (from_path, **i); - std::string to = Glib::build_filename (to_dir, **i); - copy_file (from, to); - } - vector_delete (files); - delete (files); + for (vector<string>::iterator i = files.begin(); i != files.end(); ++i) { + std::string from = Glib::build_filename (from_path, *i); + std::string to = Glib::build_filename (to_dir, *i); + copy_file (from, to); } } |