Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve EOF detection when reading command output
Do not read a line from the command output and then check if we are at EOF, because it's possible that the writer immediately exited after writing the last line of output. Instead, switch the order of actions. This is a very serious bug that can lead to Dangerzone excluding the last page of the document. It should have bit us right from the start (see aeeed41), but it seems that the small period of time it takes the kernel to close the file descriptors was hiding this bug. Fixes #560
- Loading branch information