]> git.saurik.com Git - apt.git/blobdiff - methods/file.cc
wrap every unlink call to check for != /dev/null
[apt.git] / methods / file.cc
index b689de6195c543276987fe7d84ca9e90209bb71a..8a087c36dc8b24bc9c9692b6db46cddf1929c66b 100644 (file)
@@ -76,7 +76,7 @@ bool FileMethod::Fetch(FetchItem *Itm)
       }
    }
    if (Res.IMSHit != true)
-      unlink(Itm->DestFile.c_str());
+      RemoveFile("file", Itm->DestFile);
 
    // See if the file exists
    if (stat(File.c_str(),&Buf) == 0)