mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 08:53:48 +02:00
wiki: Fix wikiconvert to show correct error message if output directory is missing.
git-svn-id: trunk@49454 -
This commit is contained in:
parent
cb2898179d
commit
80cf99ea16
@ -170,11 +170,17 @@ begin
|
||||
continue;
|
||||
end;
|
||||
end;
|
||||
if Converter is TWiki2XHTMLConverter then begin
|
||||
if Converter is TWiki2HTMLConverter then begin
|
||||
// HTML parameters
|
||||
if ParamName='css' then begin
|
||||
TWiki2XHTMLConverter(Converter).CSSFilename:=ParamValue;
|
||||
continue;
|
||||
if ParamName='html' then begin
|
||||
ParamValue := TrimAndExpandFilename(ParamValue);
|
||||
if (ParamValue='') or (not DirPathExists(ExtractFilepath(ParamValue)))
|
||||
then begin
|
||||
E('Directory for html files does not exist: '+Paramvalue);
|
||||
exit;
|
||||
end;
|
||||
TWiki2HTMLConverter(Converter).OutputDir := ExtractFilepath(Paramvalue);
|
||||
Continue;
|
||||
end;
|
||||
end;
|
||||
if Converter is TWiki2CHMConverter then begin
|
||||
@ -187,6 +193,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
TWiki2CHMConverter(Converter).CHMFile:=ParamValue;
|
||||
TWiki2CHMConverter(Converter).OutputDir := ExtractFilepath(ParamValue);
|
||||
continue;
|
||||
end else
|
||||
if ParamName='root' then begin
|
||||
@ -194,6 +201,13 @@ begin
|
||||
Continue;
|
||||
end;
|
||||
end;
|
||||
if Converter is TWiki2XHTMLConverter then begin
|
||||
// shared parameters for HTML and CHM
|
||||
if ParamName='css' then begin
|
||||
TWiki2XHTMLConverter(Converter).CSSFilename:=ParamValue;
|
||||
continue;
|
||||
end;
|
||||
end;
|
||||
end else if Param[1]<>'-' then begin
|
||||
AddFiles(Param);
|
||||
if Terminated then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user