diff options
Diffstat (limited to 'apt-inst')
-rw-r--r-- | apt-inst/contrib/extracttar.cc | 3 | ||||
-rw-r--r-- | apt-inst/deb/dpkgdb.cc | 2 | ||||
-rw-r--r-- | apt-inst/dirstream.cc | 16 |
3 files changed, 19 insertions, 2 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index d6da802fe..062c06fa4 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -136,7 +136,8 @@ bool ExtractTar::StartGzip() const char *Args[3]; string confvar = string("dir::bin::") + DecompressProg; - Args[0] = _config->Find(confvar.c_str(),DecompressProg.c_str()).c_str(); + string argv0 = _config->Find(confvar.c_str(),DecompressProg.c_str()); + Args[0] = argv0.c_str(); Args[1] = "-d"; Args[2] = 0; execvp(Args[0],(char **)Args); diff --git a/apt-inst/deb/dpkgdb.cc b/apt-inst/deb/dpkgdb.cc index c6a0e80e6..718e1ab98 100644 --- a/apt-inst/deb/dpkgdb.cc +++ b/apt-inst/deb/dpkgdb.cc @@ -383,7 +383,7 @@ bool debDpkgDB::ReadyFileList(OpProgress &Progress) return _error->Error(_("The pkg cache must be initialized first")); if (FList != 0) { - Progress.OverallProgress(1,1,1,_("Reading file list")); + Progress.OverallProgress(1,1,1,_("Reading file listing")); return true; } diff --git a/apt-inst/dirstream.cc b/apt-inst/dirstream.cc index 7ae93c9b0..898ede31b 100644 --- a/apt-inst/dirstream.cc +++ b/apt-inst/dirstream.cc @@ -61,6 +61,22 @@ bool pkgDirStream::DoItem(Item &Itm,int &Fd) case Item::CharDevice: case Item::BlockDevice: case Item::Directory: + { + struct stat Buf; + // check if the dir is already there, if so return true + if (stat(Itm.Name,&Buf) == 0) + { + if(S_ISDIR(Buf.st_mode)) + return true; + // something else is there already, return false + return false; + } + // nothing here, create the dir + if(mkdir(Itm.Name,Itm.Mode) < 0) + return false; + return true; + break; + } case Item::FIFO: break; } |