mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +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:
@@ -1972,7 +1972,16 @@ void ILibDuktape_ScriptContainer_OS_Push(duk_context *ctx, void *chain)
|
||||
tokens = lines[i].split('=');\
|
||||
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;\
|
||||
}\
|
||||
}\
|
||||
|
||||
Reference in New Issue
Block a user