]> git.saurik.com Git - apt.git/blobdiff - methods/gzip.cc
Strip Config-Version when copying status to available. ...
[apt.git] / methods / gzip.cc
index 3f0efab4f47f78ed136714522d92d21d51c830d4..a07df81a2e5d4f156c109701c30317620d605ac3 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: gzip.cc,v 1.14 2001/03/11 22:37:35 jgg Exp $
+// $Id: gzip.cc,v 1.16 2001/05/27 04:29:30 jgg Exp $
 /* ######################################################################
 
    GZip method - Take a file URI in and decompress it into the target 
@@ -68,7 +68,8 @@ bool GzipMethod::Fetch(FetchItem *Itm)
       SetCloseExec(STDOUT_FILENO,false);
       
       const char *Args[3];
-      Args[0] = _config->Find(GzPathOption,Prog).c_str();
+      string Tmp = _config->Find(GzPathOption,Prog);
+      Args[0] = Tmp.c_str();
       Args[1] = "-d";
       Args[2] = 0;
       execvp(Args[0],(char **)Args);
@@ -142,7 +143,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
    // Return a Done response
    Res.LastModified = Buf.st_mtime;
    Res.Size = Buf.st_size;
-   Res.MD5Sum = Hash.MD5.Result();
+   Res.TakeHashes(Hash);
 
    URIDone(Res);