use filename as intialdir for TSelectDialog, if given (issue #1905)

git-svn-id: trunk@9091 -
This commit is contained in:
vincents 2006-04-07 19:30:45 +00:00
parent f4ec1d306d
commit 05155ece5f

View File

@ -470,7 +470,9 @@ var
InitialDir: string;
begin
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
// remove the \ at the end.
if Copy(InitialDir,length(InitialDir),1)=PathDelim then