summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/depcache.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index aa434e99c..5af94a58b 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -326,6 +326,11 @@ bool pkgDepCache::writeStateFile(OpProgress * const /*prog*/, bool const Install
return false;
}
}
+ if (StateFile.Failed())
+ {
+ OutFile.OpFail();
+ return false;
+ }
if (OutFile.Close() == false)
return false;
chmod(state.c_str(), 0644);