Browse Source

pas2js: fixed option --simpleserver and -d relative path

git-svn-id: trunk@49008 -
(cherry picked from commit 29dee4a0d3dd89e0d9e9c0808e8d29d6ddf59368)
Mattias Gaertner 4 years ago
parent
commit
2ccfde90d0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      utils/pas2js/httpcompiler.pp

+ 2 - 1
utils/pas2js/httpcompiler.pp

@@ -558,12 +558,13 @@ begin
   S:=Checkoptions('shqd:ni:p:wP::cm:',['help','quiet','noindexpage','directory:','port:','indexpage:','watch','project::','config:','simpleserver','mimetypes:']);
   S:=Checkoptions('shqd:ni:p:wP::cm:',['help','quiet','noindexpage','directory:','port:','indexpage:','watch','project::','config:','simpleserver','mimetypes:']);
   if (S<>'') or HasOption('h','help') then
   if (S<>'') or HasOption('h','help') then
     usage(S);
     usage(S);
-  FServeOnly:=HasOption('s','serve-only');
+  FServeOnly:=HasOption('s','simpleserver');
   Quiet:=HasOption('q','quiet');
   Quiet:=HasOption('q','quiet');
   Port:=StrToIntDef(GetOptionValue('p','port'),3000);
   Port:=StrToIntDef(GetOptionValue('p','port'),3000);
   D:=GetOptionValue('d','directory');
   D:=GetOptionValue('d','directory');
   if D='' then
   if D='' then
     D:=GetCurrentDir;
     D:=GetCurrentDir;
+  D:=ExpandFileName(D);
   if HasOption('m','mimetypes') then
   if HasOption('m','mimetypes') then
     MimeTypesFile:=GetOptionValue('m','mimetypes');
     MimeTypesFile:=GetOptionValue('m','mimetypes');
   if MimeTypesFile='' then
   if MimeTypesFile='' then