- Timestamp:
- Aug 6, 2009, 3:24:17 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/rmdirhier.cc
r768 r809 22 22 23 23 #include "rmdirhier.h" 24 #include "utility.h" 24 25 25 26 #include <dirent.h> … … 71 72 chmod(dir.c_str(),S_IWRITE); 72 73 if (unlink(dir.c_str())) 73 throw FileDeleteError( dir);74 throw FileDeleteError(concatenate_path(pwd(),dir)); 74 75 return; 75 76 } 76 77 if (chdir(dir.c_str())) 77 throw BadDirectory( dir);78 throw BadDirectory(concatenate_path(pwd(),dir)); 78 79 79 80 // Delete any remaining directory entries … … 81 82 struct dirent *entry; 82 83 if (!(dp=opendir("."))) 83 throw DirectoryOpenError( dir);84 throw DirectoryOpenError(concatenate_path(pwd(),dir)); 84 85 while ((entry=readdir(dp)) != NULL) { 85 86 if ((std::string(entry->d_name) == ".") || … … 93 94 chdir(".."); 94 95 if (rmdir(dir.c_str())) 95 throw DirectoryDeleteError( dir);96 throw DirectoryDeleteError(concatenate_path(pwd(),dir)); 96 97 } 97 98
Note: See TracChangeset
for help on using the changeset viewer.