summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-06-29 17:28:33 +0200
committerJulian Andres Klode <jak@debian.org>2010-06-29 17:28:33 +0200
commitfd3b761e8cba6ed626639b50b1221246098c7b3a (patch)
treed2e588d053604bd94e5de2443cd3cb422177a691
parent3010fb0e069d2fd4c7a6ade4559bfb659bf8f2fb (diff)
Fix the atomic replace.
-rw-r--r--apt-pkg/contrib/fileutl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 0b0739cda..0b62d1bd8 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -843,9 +843,9 @@ bool FileFd::Close()
iFd = -1;
if ((Flags & Replace) == Replace) {
- FileName = TemporaryFileName; // for the unlink() below.
if (rename(TemporaryFileName.c_str(), FileName.c_str()) != 0)
Res &= _error->Errno("rename",_("Problem renaming the file"));
+ FileName = TemporaryFileName; // for the unlink() below.
}
if ((Flags & Fail) == Fail && (Flags & DelOnFail) == DelOnFail &&