mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 22:19:12 +02:00
LCL: Improving SelectInFolder implementation on Windows
This commit is contained in:
parent
4ce84e7af4
commit
90b91071fb
@ -357,6 +357,13 @@ function SelectInFolder(AFullPath: String): Boolean;
|
|||||||
begin
|
begin
|
||||||
Result := FileExists(AFullPath) or DirectoryExists(AFullPath);
|
Result := FileExists(AFullPath) or DirectoryExists(AFullPath);
|
||||||
if Result then
|
if Result then
|
||||||
ExecuteProcess('explorer.exe', '/select,' + AFullPath);
|
try
|
||||||
|
// quotes are required even in the absence of spaces
|
||||||
|
// the comma at the end "/select," is required
|
||||||
|
// do not check the return code
|
||||||
|
ExecuteProcess('explorer.exe', '/select,"' + AFullPath + '"');
|
||||||
|
except
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user