summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-08-10 14:59:56 +0200
committerJulian Andres Klode <jak@debian.org>2010-08-10 14:59:56 +0200
commit22041bd2864b8d0b401b45dde9eda4003a11fec4 (patch)
treee3f15fbd4a6486f9048764c850d183feab21adc9 /apt-pkg/pkgcachegen.cc
parentfc81e8f2deff3b86738cad78aa491b1b514b3c59 (diff)
apt-pkg, methods: Convert users of WriteEmpty to WriteAtomic.
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc4
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;