1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-17 16:53:13 +00:00

1. Updated failover for os.name() on linux to check DISTRIB_DESCRIPTION

2. Fixed substring bug, that chopped off the last character of os.name()
This commit is contained in:
Bryan Roe
2019-08-23 00:02:00 -07:00
parent 51018a2192
commit 3ef2c541f4

View File

@@ -1972,7 +1972,16 @@ void ILibDuktape_ScriptContainer_OS_Push(duk_context *ctx, void *chain)
tokens = lines[i].split('=');\ tokens = lines[i].split('=');\
if (tokens[0] == 'PRETTY_NAME')\ if (tokens[0] == 'PRETTY_NAME')\
{\ {\
this.promise._acc(tokens[1].substring(1, tokens[1].length - 2));\ this.promise._acc(tokens[1].substring(1, tokens[1].length - 1));\
break;\
}\
}\
for (i in lines)\
{\
tokens = lines[i].split('=');\
if (tokens[0] == 'DISTRIB_DESCRIPTION')\
{\
this.promise._acc(tokens[1].substring(1, tokens[1].length - 1));\
break;\ break;\
}\ }\
}\ }\