mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-22 14:09:13 +02:00
* Merging revisions r42871,r42872 from trunk:
------------------------------------------------------------------------ r42871 | michael | 2019-08-29 21:02:08 +0200 (Thu, 29 Aug 2019) | 1 line * Fix forgotten loadmimetypes ------------------------------------------------------------------------ r42872 | michael | 2019-08-29 21:07:52 +0200 (Thu, 29 Aug 2019) | 1 line * Observe -m ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@42873 -
This commit is contained in:
parent
7e962b39e2
commit
810989c765
@ -71,10 +71,12 @@ begin
|
|||||||
MimeTypesFile:=GetOptionValue('m','mimetypes');
|
MimeTypesFile:=GetOptionValue('m','mimetypes');
|
||||||
if (MimeTypesFile<>'') and not FileExists(MimeTypesFile) then
|
if (MimeTypesFile<>'') and not FileExists(MimeTypesFile) then
|
||||||
begin
|
begin
|
||||||
MimeTypesFile:='';
|
|
||||||
Log(etWarning,'mimetypes file not found: '+MimeTypesFile);
|
Log(etWarning,'mimetypes file not found: '+MimeTypesFile);
|
||||||
|
MimeTypesFile:='';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
If MimeTypesFile<>'' then
|
||||||
|
MimeTypes.LoadFromFile(MimeTypesFile);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure THTTPApplication.DoRun;
|
procedure THTTPApplication.DoRun;
|
||||||
@ -88,6 +90,7 @@ begin
|
|||||||
usage(S);
|
usage(S);
|
||||||
Quiet:=HasOption('q','quiet');
|
Quiet:=HasOption('q','quiet');
|
||||||
Port:=StrToIntDef(GetOptionValue('p','port'),3000);
|
Port:=StrToIntDef(GetOptionValue('p','port'),3000);
|
||||||
|
LoadMimeTypes;
|
||||||
D:=GetOptionValue('d','directory');
|
D:=GetOptionValue('d','directory');
|
||||||
if D='' then
|
if D='' then
|
||||||
D:=GetCurrentDir;
|
D:=GetCurrentDir;
|
||||||
|
Loading…
Reference in New Issue
Block a user