mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 00:59:47 +02:00
fixed showing file URLs on windows
git-svn-id: trunk@9379 -
This commit is contained in:
parent
03bbd90cae
commit
e70bad90fa
@ -265,8 +265,7 @@ begin
|
||||
Databases.SubstituteMacros(Result);
|
||||
//debugln('THTMLHelpDatabase.GetEffectiveBaseURL using DefaultBaseURL="',Result,'"');
|
||||
end;
|
||||
if (Result<>'') and (Result[length(Result)]<>'/') then
|
||||
Result:=Result+'/';
|
||||
Result:=AppendURLPathDelim(Result);
|
||||
end;
|
||||
|
||||
procedure THTMLHelpDatabase.Load(Storage: TConfigStorage);
|
||||
|
@ -554,6 +554,7 @@ function ExtractURLDirectory(const URL: string): string;
|
||||
function TrimUrl(const URL: string): string;
|
||||
function TrimURLPath(const URLPath: string): string;
|
||||
function IsFileURL(const URL: string): boolean;
|
||||
function AppendURLPathDelim(const URLPath: string): string;
|
||||
|
||||
procedure CreateListAndAdd(const AnObject: TObject; var List: TList;
|
||||
OnlyIfNotExists: boolean);
|
||||
@ -668,7 +669,7 @@ end;
|
||||
|
||||
function URLFilenameIsAbsolute(const Filename: string): boolean;
|
||||
begin
|
||||
Result:=FilenameIsUnixAbsolute(Filename);
|
||||
Result:=FilenameIsAbsolute(SetDirSeparators(Filename));
|
||||
end;
|
||||
|
||||
function FindURLPathStart(const URL: string): integer;
|
||||
@ -738,6 +739,12 @@ begin
|
||||
and (CompareByte(URL[1],'file://',7)=0);
|
||||
end;
|
||||
|
||||
function AppendURLPathDelim(const URLPath: string): string;
|
||||
begin
|
||||
if (Result<>'') and (Result[length(Result)]<>'/') then
|
||||
Result:=Result+'/';
|
||||
end;
|
||||
|
||||
function ExtractURLPath(const URL: string): string;
|
||||
var
|
||||
URLType, URLPath, URLParams: string;
|
||||
@ -1287,7 +1294,7 @@ begin
|
||||
if Result='' then exit;
|
||||
Result:=FilenameToURL(Result);
|
||||
end;
|
||||
Result:=AppendPathDelim(Result);
|
||||
Result:=AppendURLPathDelim(Result);
|
||||
end;
|
||||
|
||||
function THelpDatabases.GetBaseDirectoryForBasePathObject(
|
||||
@ -1306,7 +1313,7 @@ begin
|
||||
Result:=THelpBasePathObject(BasePathObject).BasePath
|
||||
else
|
||||
Result:='';
|
||||
Result:=AppendPathDelim(Result);
|
||||
Result:=AppendURLPathDelim(Result);
|
||||
end;
|
||||
|
||||
function THelpDatabases.FindViewer(const MimeType: string; var ErrMsg: string;
|
||||
|
Loading…
Reference in New Issue
Block a user