Bug 504681

Summary: PDF name which starts with '#' opens a wrong file (an image)
Product: [Applications] okular Reporter: dorla.hutch
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: RESOLVED DUPLICATE    
Severity: major CC: john.kizer
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: an irrelevant PDF file

Description dorla.hutch 2025-05-22 22:00:18 UTC
Created attachment 181663 [details]
an irrelevant PDF file

SUMMARY

The weirdest thing I've seen. When a PDF is opened, starting with '#' in its name, it reliably opens an unrelated image file in the same folder instead. If the image file is removed, it will open the PDF normally. The effect is independent of the image file and the PDF content. You can put any JPEG in the same folder and see.

STEPS TO REPRODUCE
1. Rename PDF to something which starts with '#'
2. put an image in the same folder (the name really doesn't matter, not even the file extension). Note: the folder can be totally empty.
3. Open the PDF

OBSERVED RESULT

The image is shown. The file size is depicted as 0 bytes.

EXPECTED RESULT

Shows the actual PDF file and correct meta data.

SOFTWARE/OS VERSIONS
Windows: Windows 11 Pro, Build 10.0.26100
Okular Version: 23.08.1
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION

Not tested under Linux. Affects PDF files, but not for example when opening image files.
Comment 1 John Kizer 2025-05-27 04:16:33 UTC
Hi - merging this in with the existing report for this issue. Thanks!

*** This bug has been marked as a duplicate of bug 495839 ***