recursive clean out dir

svn path=/trunk/boinc/; revision=675
This commit is contained in:
Eric Heien 2002-12-02 20:51:47 +00:00
parent 5eadc314b5
commit c022311f51
1 changed files with 6 additions and 0 deletions

View File

@ -199,6 +199,12 @@ int clean_out_dir(char* dirpath) {
retval = dir_scan(filename, dirp);
if (retval) break;
sprintf(path, "%s/%s", dirpath, filename);
clean_out_dir(path);
#ifdef _WIN32
RemoveDirectory(path);
#else
rmdir(path);
#endif
retval = file_delete(path);
if (retval) {
dir_close(dirp);