Sfoglia il codice sorgente

use buffered writing for InRelease splitting

Hardly noticeable, but given that we have the option to easily enable
it, lets enable it as every newline in the message is written
individually by the code.
David Kalnischkies 10 anni fa
parent
commit
46c4043d74
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      apt-pkg/contrib/gpgv.cc

+ 1 - 1
apt-pkg/contrib/gpgv.cc

@@ -341,7 +341,7 @@ bool OpenMaybeClearSignedFile(std::string const &ClearSignedFileName, FileFd &Me
    unlink(message);
    unlink(message);
    free(message);
    free(message);
 
 
-   MessageFile.OpenDescriptor(messageFd, FileFd::ReadWrite, true);
+   MessageFile.OpenDescriptor(messageFd, FileFd::ReadWrite | FileFd::BufferedWrite, true);
    if (MessageFile.Failed() == true)
    if (MessageFile.Failed() == true)
       return _error->Error("Couldn't open temporary file to work with %s", ClearSignedFileName.c_str());
       return _error->Error("Couldn't open temporary file to work with %s", ClearSignedFileName.c_str());