summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-25 20:36:23 +0200
committerMichael Vogt <mvo@debian.org>2013-07-25 20:36:23 +0200
commita80a03448fe11f8ea3fd4a8c525fc413c9ce9037 (patch)
tree0cc227ad162b0b9be9003ec259a870240b57cf7a /apt-pkg
parentdb0e2486a18332154b6c8ac6a6f0f74f40b40a05 (diff)
call fdopen() after FileFd was checked
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/indexcopy.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index 1d61b974d..a2adb2d00 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -714,9 +714,9 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
} else {
Target.Open(TargetF,FileFd::WriteAtomic);
}
- FILE *TargetFl = fdopen(dup(Target.Fd()),"w");
if (_error->PendingError() == true)
return false;
+ FILE *TargetFl = fdopen(dup(Target.Fd()),"w");
if (TargetFl == 0)
return _error->Errno("fdopen","Failed to reopen fd");