]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/fileutl.cc
implement PDiff patching for compressed files
[apt.git] / apt-pkg / contrib / fileutl.cc
index 1be782bac8c4629dd7fc81e1f276189db107d701..d7c9424cf63ce25e11cb5a3bed84281bb11f7709 100644 (file)
@@ -2006,12 +2006,13 @@ bool FileFd::Close()
    {
       if ((Flags & Compressed) != Compressed && iFd > 0 && close(iFd) != 0)
         Res &= _error->Errno("close",_("Problem closing the file %s"), FileName.c_str());
-      if (d != NULL)
-      {
-        Res &= d->CloseDown(FileName);
-        delete d;
-        d = NULL;
-      }
+   }
+
+   if (d != NULL)
+   {
+      Res &= d->CloseDown(FileName);
+      delete d;
+      d = NULL;
    }
 
    if ((Flags & Replace) == Replace) {