summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-inst/dirstream.cc16
-rw-r--r--configure.in2
-rw-r--r--debian/changelog1
3 files changed, 18 insertions, 1 deletions
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;
}
diff --git a/configure.in b/configure.in
index 6130ab544..bc5d2b572 100644
--- a/configure.in
+++ b/configure.in
@@ -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)
diff --git a/debian/changelog b/debian/changelog
index 2a636ae30..9115faabc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
--