Skip to content

Commit

Permalink
fix wkhtmltopdf#3119 by ensuring /dev/stdout is writable prior to usi…
Browse files Browse the repository at this point in the history
…ng it directly
  • Loading branch information
MagicalTux committed Jun 13, 2021
1 parent 5b26acc commit 45f5b3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/pdfconverter.cc
Expand Up @@ -24,6 +24,7 @@
#include <QDateTime>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QPair>
#include <QPrintEngine>
#include <QTimer>
Expand Down Expand Up @@ -344,7 +345,7 @@ void PdfConverterPrivate::pagesLoaded(bool ok) {
lout = settings.out;
if (settings.out == "-") {
#ifndef Q_OS_WIN32
if (QFile::exists("/dev/stdout"))
if ((QFile::exists("/dev/stdout")) && (QFileInfo("/dev/stdout").isWritable()))
lout = "/dev/stdout";
else
#endif
Expand Down

0 comments on commit 45f5b3b

Please sign in to comment.