[Lazarus] Opening a file with spaces in the filename (again)
Reinier Olislagers
reinierolislagers at gmail.com
Wed Mar 6 08:43:13 CET 2013
On 6-3-2013 0:19, Bart wrote:
> On 3/5/13, Bart <bartjunk64 at gmail.com> wrote:
> I patched OpenURL on Windows to quote the URL if it is in file:// URI
> schem and contains spaces on NT platform.
> This should fix the original issue of
> http://bugs.freepascal.org/view.php?id=21659
Nice - I updated
http://wiki.lazarus.freepascal.org/index.php?title=openurl
Please correct if wrong.
> Question remains if we should quote APath in OpenDocument?
>
> AFAIK ShellExecute(0, nil,PChar(APath), nil, nil, SW_SHOWNORMAL) will
> always eventually call something like "\path\to\exe" "%1", where the
> %1 is quoted and will become "APath", otherwise no app would never be
> able to open files with spaces in the name via this route.
> (Meaning any sane app should register itself in such a way that quotes
> are forced around the parameter)
My test program in
http://bugs.freepascal.org/file_download.php?file_id=15801&type=bug
suggests doing nothing is fine ;)
Opening pdfs with sumatrapdf and text files with Notepad++ having spaces
in their names works fine here.
More information about the Lazarus
mailing list