diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-11 09:14:02 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-11 09:14:02 +0200 |
commit | 180691bee7484f25d9879a77f577537ae1d98907 (patch) | |
tree | 845c06c2fdf0215902b7b08cf8c91dcdbad6c20d /apt-pkg/pkgcachegen.cc | |
parent | 5368af78fb6c996c8ee24e5cf8f645cf00259ead (diff) | |
parent | 22041bd2864b8d0b401b45dde9eda4003a11fec4 (diff) |
merged from the debian-experimental-ma branch
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index c9a9a753c..ed35174bb 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1192,7 +1192,7 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress if (Writeable == true && CacheFile.empty() == false) { unlink(CacheFile.c_str()); - CacheF = new FileFd(CacheFile,FileFd::WriteEmpty); + CacheF = new FileFd(CacheFile,FileFd::WriteAtomic); fchmod(CacheF->Fd(),0644); Map = CreateDynamicMMap(CacheF, MMap::Public); if (_error->PendingError() == true) @@ -1254,7 +1254,7 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress // Write it back if (Writeable == true && SrcCacheFile.empty() == false) { - FileFd SCacheF(SrcCacheFile,FileFd::WriteEmpty); + FileFd SCacheF(SrcCacheFile,FileFd::WriteAtomic); if (_error->PendingError() == true) return false; |