Changeset 1213
- Timestamp:
- Oct 9, 2010, 4:47:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/rmdirhier.cc
r1186 r1213 25 25 #include "utility.h" 26 26 27 #include <cstdio> 27 28 #include <cstring> 28 29 #include <dirent.h> … … 75 76 // Make sure file is removable before removing it 76 77 chmod(dir.c_str(),S_IWRITE); 77 if ( unlink(dir.c_str()))78 if (remove(dir.c_str())) 78 79 throw FileDeleteError(concatenate_path(pwd(),dir)); 79 80 return; … … 97 98 // Remove the directory from its parent 98 99 chdir(".."); 99 if (r mdir(dir.c_str()))100 if (remove(dir.c_str())) 100 101 throw DirectoryDeleteError(concatenate_path(pwd(),dir)); 101 102 }
Note: See TracChangeset
for help on using the changeset viewer.