[Patch] OpenURL on Windows needs double quotes for file:// URL
Original Reporter info from Mantis: BigChimp
-
Reporter name: Reinier Olislagers
Original Reporter info from Mantis: BigChimp
- Reporter name: Reinier Olislagers
Description:
Calling OpenURL on Windows with a path+file with spaces in it does not work; calling it enclosed in " does work.
Documentation specifies "AURL must be an URL like "... "file://C:\test.txt."... and doesn't mention double quotes.
Confirmed by Felipe (see below).
Steps to reproduce:
Use test program from 21651.
Select a pdf with spaces in the path.
Click OpenURL
PDF does not open... but neither is an error message generated.
Apply patch; pdf should open now.
Additional information:
Tested on Win Vista x64; not tested on WinCE or Win 9x (ShellExecuteA) range.
See Lazarus mailing list dicussion todo, subject
lclintf.OpenURL parameter: double quotes or not?
On 6-4-2012 13:30, Felipe Monteiro de Carvalho wrote:
You should create a bug report (or a patch). The Windows code of
OpenURL should detect the spaces and add the quotes.
Patch included which strictly checks for file:// URLs. No idea if or what checks should be done on http:// etc URLs...
Mantis conversion info:
- Mantis ID: 21659
- OS: Windows
- OS Build: Vista
- Build: 36600
- Platform: x64
- Version: 0.9.31 (SVN)
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 36744 (#5f2d2259), 36745 (#e87cc8fb), 36934 (#18fb5b93), 40490 (#6e06c2f6)
- Monitored by: » @flyingsheep (Bart Broersma)