Преглед на файлове

On IMS-Hit, you can't assume local compression :/.

Jay Freeman (saurik) преди 9 години
родител
ревизия
c65bdf3bf1
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      apt-pkg/acquire-item.cc

+ 5 - 1
apt-pkg/acquire-item.cc

@@ -3070,6 +3070,7 @@ void pkgAcqIndex::StageDownloadDone(string const &Message)
    {
       // copy FinalFile into partial/ so that we check the hash again
       string const FinalFile = GetExistingFilename(GetFinalFileNameFromURI(Target.URI));
+      DestFile = GetKeepCompressedFileName(GetPartialFileNameFromURI(Target.URI), Target);
       if (symlink(FinalFile.c_str(), DestFile.c_str()) != 0)
 	 _error->WarningE("pkgAcqIndex::StageDownloadDone", "Symlinking final file %s back to %s failed", FinalFile.c_str(), DestFile.c_str());
       else
@@ -3078,7 +3079,10 @@ void pkgAcqIndex::StageDownloadDone(string const &Message)
 	 Filename = DestFile;
       }
       Stage = STAGE_DECOMPRESS_AND_VERIFY;
-      Desc.URI = "store:" + Filename;
+      if (Filename != DestFile && flExtension(Filename) == flExtension(DestFile))
+         Desc.URI = "copy:" + Filename;
+      else
+         Desc.URI = "store:" + Filename;
       QueueURI(Desc);
       SetActiveSubprocess(::URI(Desc.URI).Access);
       return;