Bug 83609 - Exit code when file doesn't exist
Summary: Exit code when file doesn't exist
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: pdftohtml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-08 11:50 UTC by Juan Ibiapina
Modified: 2015-03-27 21:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Simple patch, adds variable exit_status and sets to EXIT_FAILURE before goto error (1.88 KB, patch)
2015-02-23 11:20 UTC, Matt Atkinson
Details | Splinter Review

Description Juan Ibiapina 2014-09-08 11:50:06 UTC
Simplest problematic case is this:

    $ pdftohtml a.pdf

The exit status for this command is 0 if the file doesn't exist. It should be greater than 0.
Comment 1 Juan Ibiapina 2014-09-08 11:53:15 UTC
(In reply to comment #0)
> Simplest problematic case is this:
> 
>     $ pdftohtml a.pdf
> 
> The exit status for this command is 0 if the file doesn't exist. It should
> be greater than 0.

Tested on
OSX: pdftohtml version 0.26.3 installed using brew install poppler (v 0.26.3)
Debian: pdftohtml version 0.26.4 installed using apt-get install poppler-utils     (0.26.4-1)
Comment 2 Matt Atkinson 2015-02-23 11:20:08 UTC
Created attachment 113753 [details] [review]
Simple patch, adds variable exit_status and sets to EXIT_FAILURE before goto error

Simple patch, adds variable exit_status and sets to EXIT_FAILURE before goto error
Comment 3 Albert Astals Cid 2015-03-27 21:43:58 UTC
Matt thanks for the patch i've pushed something based on yours but reversed, i.e. initialize to error and just set success just before the error: goto in case everything went well.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.