mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 19:10:18 +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');
|
||||
if (MimeTypesFile<>'') and not FileExists(MimeTypesFile) then
|
||||
begin
|
||||
MimeTypesFile:='';
|
||||
Log(etWarning,'mimetypes file not found: '+MimeTypesFile);
|
||||
MimeTypesFile:='';
|
||||
end;
|
||||
end;
|
||||
If MimeTypesFile<>'' then
|
||||
MimeTypes.LoadFromFile(MimeTypesFile);
|
||||
end;
|
||||
|
||||
procedure THTTPApplication.DoRun;
|
||||
@ -88,6 +90,7 @@ begin
|
||||
usage(S);
|
||||
Quiet:=HasOption('q','quiet');
|
||||
Port:=StrToIntDef(GetOptionValue('p','port'),3000);
|
||||
LoadMimeTypes;
|
||||
D:=GetOptionValue('d','directory');
|
||||
if D='' then
|
||||
D:=GetCurrentDir;
|
||||
|
Loading…
Reference in New Issue
Block a user