* pkgDirStream has (slightly) better extract support now
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 21 Nov 2005 10:33:57 +0000 (10:33 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 21 Nov 2005 10:33:57 +0000 (10:33 +0000)
apt-inst/dirstream.cc
configure.in
debian/changelog

index 7ae93c9..898ede3 100644 (file)
@@ -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;
    }
index 6130ab5..bc5d2b5 100644 (file)
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.42.3")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.42.4")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index 2a636ae..9115faa 100644 (file)
@@ -5,6 +5,7 @@ apt (0.6.42.4) unstable; urgency=low
     * gl.po: Completed to 510 strings (Closes: #338356)
   * added support for "/etc/apt/sources.list.d" directory 
     (closes: #66325)
+  * make pkgDirStream (a bit) more complete
   
  --