diff options
| author | Andre Heinecke <[email protected]> | 2017-11-14 13:28:32 +0000 | 
|---|---|---|
| committer | Andre Heinecke <[email protected]> | 2017-11-14 13:28:32 +0000 | 
| commit | 56b27b21d5f8dd95b9d6415c5e98b821774f3093 (patch) | |
| tree | e019212e7253414509a8eb8ca9a0166798692a9f /lang/qt/src | |
| parent | core: use getdents64 syscall on linux instead of getdents. (diff) | |
| download | gpgme-56b27b21d5f8dd95b9d6415c5e98b821774f3093.tar.gz gpgme-56b27b21d5f8dd95b9d6415c5e98b821774f3093.zip | |
qt: Fix IODeviceDataProvider with Process
* lang/qt/src/dataprovider.cpp (blocking_read): Keep
reading if process is not atEnd.
--
This fixes a regression in Kleopatra that uses this dataprovider
to chain the gpgtar process to the encryption / signing.
Diffstat (limited to 'lang/qt/src')
| -rw-r--r-- | lang/qt/src/dataprovider.cpp | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/lang/qt/src/dataprovider.cpp b/lang/qt/src/dataprovider.cpp index 0d527a07..a025a03e 100644 --- a/lang/qt/src/dataprovider.cpp +++ b/lang/qt/src/dataprovider.cpp @@ -185,7 +185,11 @@ static qint64 blocking_read(const std::shared_ptr<QIODevice> &io, char *buffer,                  if (p->error() == QProcess::UnknownError &&                          p->exitStatus() == QProcess::NormalExit &&                          p->exitCode() == 0) { -                    return 0; +                    if (io->atEnd()) { +                        // EOF +                        return 0; +                    } // continue reading even if process ended to ensure +                      // everything is read.                  } else {                      Error::setSystemError(GPG_ERR_EIO);                      return -1; | 
