mirror of https://github.com/adamdruppe/arsd.git
sometimes there are no arg 0
This commit is contained in:
parent
6f03281044
commit
f6067f7b35
4
cgi.d
4
cgi.d
|
@ -957,7 +957,7 @@ class Cgi {
|
||||||
{
|
{
|
||||||
import core.runtime;
|
import core.runtime;
|
||||||
auto sfn = getenv("SCRIPT_FILENAME");
|
auto sfn = getenv("SCRIPT_FILENAME");
|
||||||
scriptFileName = sfn.length ? sfn : Runtime.args[0];
|
scriptFileName = sfn.length ? sfn : (Runtime.args.length ? Runtime.args[0] : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool iis = false;
|
bool iis = false;
|
||||||
|
@ -1751,7 +1751,7 @@ class Cgi {
|
||||||
|
|
||||||
{
|
{
|
||||||
import core.runtime;
|
import core.runtime;
|
||||||
scriptFileName = Runtime.args[0];
|
scriptFileName = Runtime.args.length ? Runtime.args[0] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue