LCL: fixed FileListBox.FileName property, if a directory is selected (issue #11965) from WhiteWind

git-svn-id: trunk@16260 -
This commit is contained in:
vincents 2008-08-26 22:42:11 +00:00
parent c6d49b3802
commit a5edfe5a9b

View File

@ -352,10 +352,11 @@ begin
if (i<0) or (i>=Items.Count) then
FFileName := ''
else begin
FFileName := FDirectory+DirectorySeparator+Items[i];
FFileName := Items[i];
if (FFileName<>'')
and (FFileName[1]='[') and (FFileName[length(FFileName)]=']') then
FFileName:=copy(FFileName,2,length(FFileName)-2);
FFileName:= FDirectory+DirectorySeparator+FFileName;
end;
DoChangeFile;
end;