mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 00:59:30 +02:00
fixed TSaveDialog
git-svn-id: trunk@17148 -
This commit is contained in:
parent
9c5f120de1
commit
7edb019302
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
------------------------------------------------------------------------------}
|
||||
|
Loading…
Reference in New Issue
Block a user