summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-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 &&