Bug 20818

Summary: Undocumented case-insensitive matching of filenames in PDFDoc::PDFDoc()
Product: poppler Reporter: Eric Toombs <ewtoombs>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: 0001-removes-case-insensitive-matching-of-filenames

Description Eric Toombs 2009-03-23 20:33:14 UTC
Created attachment 24176 [details] [review]
0001-removes-case-insensitive-matching-of-filenames

This patch gets rid of what I think many would consider undesirable
behaviour allowing, to some extent, case-insensitive matching of the file name passed to the PDFDoc constructor. It used to try opening, for example, "fileName.Pdf", then failing that try opening "filename.pdf", then failing that try opening "FILENAME.PDF".

This attempt at matching the case doesn't make sense in a case-sensitive file system and it is certainly not what developers using the library would expect to see happen, since nowhere in at least poppler-glib's documentation does it suggest poppler_new_document_from_file() would do this with the file name.
Comment 1 Carlos Garcia Campos 2009-03-25 01:21:06 UTC
Agree, I see no reasons to do it. I didn't even know we were doing so.
Comment 2 Albert Astals Cid 2009-03-25 13:13:35 UTC
Commited with the change of storing errno just after the if, not after some more function calls that might change errno value
Comment 3 Eric Toombs 2009-03-26 00:41:40 UTC
I just pulled the new master HEAD from the repository. I agree with you about your change, Albert.

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.