SysUtils.FileSearch doesn't handle paths wrapped in double quotes
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
On Windows, $PATH parts may be wrapped in double quotes, like
C:\WINNT\system32;"C:\Program Files\GnuWin32\bin";"C:\usr\local\share\ffmpeg"
At least Windows 7 standard console handles it Ok (for example, programs inside C:\usr\local\share\ffmpeg may be executed by typing only the basename).
However, current implementation of SysUtils.FileSearch doesn't handle such path correctly, that is files are never found inside C:\usr\local\share\ffmpeg. Attaching simple patch for rtl/objpas/sysutils/sysutils.inc that fixes it, by processing each path part by AnsiDequotedStr.
Mantis conversion info:
- Mantis ID: 19279
- Version: 2.4.2
- Fixed in version: 2.6.0
- Target version: 2.6.0