mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-07 14:52:37 +02:00
use filename as intialdir for TSelectDialog, if given (issue #1905)
git-svn-id: trunk@9091 -
This commit is contained in:
parent
f4ec1d306d
commit
05155ece5f
@ -470,7 +470,9 @@ var
|
|||||||
InitialDir: string;
|
InitialDir: string;
|
||||||
begin
|
begin
|
||||||
Buffer := CoTaskMemAlloc(MAX_PATH);
|
Buffer := CoTaskMemAlloc(MAX_PATH);
|
||||||
InitialDir := TSelectDirectoryDialog(ACommonDialog).InitialDir;
|
InitialDir := TSelectDirectoryDialog(ACommonDialog).FileName;
|
||||||
|
if length(InitialDir)=0 then
|
||||||
|
InitialDir := TSelectDirectoryDialog(ACommonDialog).InitialDir;
|
||||||
if length(InitialDir)>0 then begin
|
if length(InitialDir)>0 then begin
|
||||||
// remove the \ at the end.
|
// remove the \ at the end.
|
||||||
if Copy(InitialDir,length(InitialDir),1)=PathDelim then
|
if Copy(InitialDir,length(InitialDir),1)=PathDelim then
|
||||||
|
Loading…
Reference in New Issue
Block a user