fixed TSaveDialog

git-svn-id: trunk@17148 -
This commit is contained in:
mattias 2008-10-28 17:08:42 +00:00
parent 9c5f120de1
commit 7edb019302
3 changed files with 10 additions and 2 deletions

View File

@ -63,6 +63,7 @@ function FileSize(const Filename: string): int64;
function GetFileDescription(const AFilename: string): string;
function ReadAllLinks(const Filename: string;
ExceptionOnError: boolean): string;
function TryReadAllLinks(const Filename: string): string;
// directories
function DirPathExists(const FileName: String): Boolean;

View File

@ -140,11 +140,11 @@ procedure TOpenDialog.DereferenceLinks;
var i: integer;
begin
if Filename<>'' then
FileName := ReadAllLinks(FileName, false);
Filename:=TryReadAllLinks(FileName);
if Files<>nil then begin
for i:=0 to Files.Count-1 do begin
if Files[i]<>'' then
Files[i]:=ReadAllLinks(Files[i], false);
Files[i]:=TryReadAllLinks(Files[i]);
end;
end;
end;

View File

@ -1018,6 +1018,13 @@ begin
{$ENDIF}
end;
function TryReadAllLinks(const Filename: string): string;
begin
Result:=ReadAllLinks(Filename,false);
if Result='' then
Result:=Filename;
end;
{------------------------------------------------------------------------------
function ExtractFileNameOnly(const AFilename: string): string;
------------------------------------------------------------------------------}