summaryrefslogtreecommitdiff
path: root/apt-inst/dirstream.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-04-16 19:24:07 +0200
committerMichael Vogt <egon@debian-devbox>2012-04-16 19:24:07 +0200
commit443f5e8a3205162ec6933529c5ca0c95ad3f6941 (patch)
tree3e2da22dcecc8eeaabc1ac5ceac0407a8e3cc25f /apt-inst/dirstream.cc
parent96273866174c54bdb25813633891f29668d43848 (diff)
parentf352743312edeebf666e1c8304cdc4baf457469f (diff)
merge from the expermental2 branch
Diffstat (limited to 'apt-inst/dirstream.cc')
-rw-r--r--apt-inst/dirstream.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-inst/dirstream.cc b/apt-inst/dirstream.cc
index 9b6a56848..65d1aa188 100644
--- a/apt-inst/dirstream.cc
+++ b/apt-inst/dirstream.cc
@@ -11,6 +11,8 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#include<config.h>
+
#include <apt-pkg/dirstream.h>
#include <apt-pkg/error.h>
@@ -44,15 +46,13 @@ bool pkgDirStream::DoItem(Item &Itm,int &Fd)
// fchmod deals with umask and fchown sets the ownership
if (fchmod(iFd,Itm.Mode) != 0)
{
- _error->Errno("fchmod",_("Failed to write file %s"), Itm.Name);
close(iFd);
- return false;
+ return _error->Errno("fchmod",_("Failed to write file %s"), Itm.Name);
}
if (fchown(iFd,Itm.UID,Itm.GID) != 0 && errno != EPERM)
{
- return _error->Errno("fchown",_("Failed to write file %s"), Itm.Name);
close(iFd);
- return false;
+ return _error->Errno("fchown",_("Failed to write file %s"), Itm.Name);
}
Fd = iFd;
return true;