summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r--apt-pkg/acquire-worker.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index d8bdf5699..b5f52a3ca 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -742,9 +742,9 @@ void pkgAcquire::Worker::PrepareFiles(char const * const caller, pkgAcquire::Que
for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
{
pkgAcquire::Item const * const Owner = *O;
- if (Owner->DestFile == filename)
+ if (Owner->DestFile == filename || filename == "/dev/null")
continue;
- unlink(Owner->DestFile.c_str());
+ RemoveFile("PrepareFiles", Owner->DestFile);
if (link(filename.c_str(), Owner->DestFile.c_str()) != 0)
{
// different mounts can't happen for us as we download to lists/ by default,
@@ -759,7 +759,7 @@ void pkgAcquire::Worker::PrepareFiles(char const * const caller, pkgAcquire::Que
else
{
for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
- unlink((*O)->DestFile.c_str());
+ RemoveFile("PrepareFiles", (*O)->DestFile);
}
}
/*}}}*/