diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:58:39 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:58:39 +0000 |
commit | 4520bfdf366b2729903b02ecd4f8d6788bffc9c1 (patch) | |
tree | bfd894997dc1d68989dd54ed72efb5e6e4d593d4 /apt-inst | |
parent | 201e83c2623cd9d7aacaf3a180237c605fe7e049 (diff) |
Minor bug fixes
Author: jgg
Date: 2001-09-30 04:06:59 GMT
Minor bug fixes
Diffstat (limited to 'apt-inst')
-rw-r--r-- | apt-inst/contrib/extracttar.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index f8bd109ce..95869fe4a 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: extracttar.cc,v 1.3 2001/05/27 23:47:09 jgg Exp $ +// $Id: extracttar.cc,v 1.4 2001/09/30 04:06:59 jgg Exp $ /* ###################################################################### Extract a Tar - Tar Extractor @@ -32,7 +32,7 @@ #include <fcntl.h> #include <iostream.h> /*}}}*/ - + // The on disk header for a tar file. struct ExtractTar::TarHeader { @@ -69,7 +69,8 @@ ExtractTar::ExtractTar(FileFd &Fd,unsigned long Max) : File(Fd), /* */ ExtractTar::~ExtractTar() { - Done(false); + // Error close + Done(true); } /*}}}*/ // ExtractTar::Done - Reap the gzip sub process /*{{{*/ @@ -190,11 +191,9 @@ bool ExtractTar::Go(pkgDirStream &Stream) // Decode all of the fields pkgDirStream::Item Itm; - unsigned long UID; - unsigned long GID; if (StrToNum(Tar->Mode,Itm.Mode,sizeof(Tar->Mode),8) == false || - StrToNum(Tar->UserID,UID,sizeof(Tar->UserID),8) == false || - StrToNum(Tar->GroupID,GID,sizeof(Tar->GroupID),8) == false || + StrToNum(Tar->UserID,Itm.UID,sizeof(Tar->UserID),8) == false || + StrToNum(Tar->GroupID,Itm.GID,sizeof(Tar->GroupID),8) == false || StrToNum(Tar->Size,Itm.Size,sizeof(Tar->Size),8) == false || StrToNum(Tar->MTime,Itm.MTime,sizeof(Tar->MTime),8) == false || StrToNum(Tar->Major,Itm.Major,sizeof(Tar->Major),8) == false || |