*** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Please remove this comment after reading and before submitting - thanks! *** SUMMARY When open a pdf file "D:\#Temp\#Share\test.pdf", it does not open the file. Instead, it opens the folder "D:\#Temp\" STEPS TO REPRODUCE - Same as summary OBSERVED RESULT - Same as summary EXPECTED RESULT - Same as summary SOFTWARE/OS VERSIONS Windows: ADDITIONAL INFORMATION
Thank you for reporting, but this is unclear and there is not enough information to try to replicate this behavior. Can you describe how you are trying to open this file (file->open, is okualr registered to open PDFs through windows, etc). You say that it opens a folder. What opens a folder? Is okular somehow displaying the directory, or is windows explorer opening a view at the location? Are you able to open the PDF in question if it is in a different location, like your Desktop?
It is easy to reproduce: 1. Create a folder with "#" in its name, put a pdf file and two image files in it. From example, I have D:\#test\ folder, 1 pdf and 2 pictures in it (attached 1.png). 2. Open the pdf file with okular, I use "open with" from windows right click pop-up menu. 3. Okular does not open the pdf, but show the 2 picture file (attached 2.png). 4. You can the open history from attached 3.png
Created attachment 176032 [details] reproduce step 1
Created attachment 176033 [details] reproduce step 2
Created attachment 176034 [details] reproduce step 3
Thanks for the steps. I can duplicate this behavior on Windows 11 (Okular 24.11.80). I will have to look more into what could cause this, but here is a summary of what I tested. - I can only cause this behavior when the file is opened through Windows explorer with 'Right Click->Open With->Okular'. It does not happen when the file is opened from inside of Okular(File->open) and does not happen when the file is opened by dragging the PDF into an already running Okular instance. A short-term solution would be opening the file in one of these other ways. - If only happens when the folder has a ‘#’ in the first position, or when ‘.#’ are the first two positions. Names such as 't#est\test.pdf' work correctly. - This happens when opened from the commands line too ‘okular.exe test.pdf’ if the above regarding ‘#’ is true about the file directory. This also happens when the file is hard linked i.e. ‘okular.exe D:\#test\test.pdf’. - The same behavior occurs if Okular is invoked with path to the directory the PDF file is in. ‘okular.exe D:\#test’. This works with out without # and I believe is intended behavior My tentative conclusion is this is an issue with parsing the command line parameter (Windows invokes the call for ‘open with’ through command line parameters) which causes the PDF file to be ignored when the directory starts with #. When I look more into it, I will see if the issue Windows only or also persists on a Linux system.