diff options
Diffstat (limited to 'ftparchive/byhash.cc')
-rw-r--r-- | ftparchive/byhash.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ftparchive/byhash.cc b/ftparchive/byhash.cc index 0a38457c0..354d089c3 100644 --- a/ftparchive/byhash.cc +++ b/ftparchive/byhash.cc @@ -41,9 +41,8 @@ void DeleteAllButMostRecent(std::string dir, int KeepFiles) auto files = GetListOfFilesInDir(dir, false); std::sort(files.begin(), files.end(), Cmp()); - for (auto I=files.begin(); I<files.end()-KeepFiles; I++) { - unlink((*I).c_str()); - } + for (auto I=files.begin(); I<files.end()-KeepFiles; ++I) + RemoveFile("DeleteAllButMostRecent", *I); } // Takes a input filename (e.g. binary-i386/Packages) and a hashstring |