Browse Source

call fdopen() after FileFd was checked

Michael Vogt 13 years ago
parent
commit
a80a03448f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apt-pkg/indexcopy.cc

+ 1 - 1
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");