Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: Check file before creating print job (#78)
Try to open the file at the given file path before creating a print job using `cpdbPrintFD`. Otherwise, passing an invalid path causes a print job to be created that never gets processed. For example, with cpdb-text-frontend, passing an invalid path would print an error message: > print-file /dummy/nonexistent PDF CUPS [Error] [Frontend] Error opening file /dummy/nonexistent on PDF CUPS: No such file or directory But it would still create a print job: $ lpstat PDF-209 michi 0 2024-11-20T09:01:02 CET That one would never get finished and has to be manually cancelled using `cancel <jobid>`. (I noticed this because on KDE Plamsa, the printer widget was showing after that failed attempt, due to the pending print job.) With this commit in place, the same error message is shown, but no print job is created.
- Loading branch information