Explorar o código

call fdopen() after FileFd was checked

Michael Vogt %!s(int64=13) %!d(string=hai) anos
pai
achega
a80a03448f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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");