Remove the directory recursively including itself. The function
is used in two places only:
* LV2Plugin::add_state() -- no change, remove tmp. state
* Session::save_as() -- on error, remove target
In both cases removing the folder itself is correct.
remove_directory (const std::string& dir)
{
remove_directory_internal (dir, 0, 0, false);
+ g_rmdir (dir.c_str());
}
string
/**
* Remove all the contents of a directory recursively.
- * @note dir will not be removed
+ * including the dir itself (`rm -rf $dir`)
*
- * @param dir The directory to remove files from.
+ * @param dir The directory to remove recursively
*/
LIBPBD_API void remove_directory (const std::string& dir);
PBD::remove_directory (output_dir_path);
- // doesn't actually remove directory though...just contents
- CPPUNIT_ASSERT (Glib::file_test (output_dir_path, Glib::FILE_TEST_IS_DIR));
-
- files_in_output_dir.clear ();
-
- PBD::get_paths (files_in_output_dir, output_dir_path, false, true);
-
- CPPUNIT_ASSERT (files_in_output_dir.size () == 0);
+ CPPUNIT_ASSERT (!Glib::file_test (output_dir_path, Glib::FILE_TEST_EXISTS));
}
void