processes() optimized parsing ps name
This commit is contained in:
parent
8af747e8e9
commit
52e02d70a7
@ -273,7 +273,11 @@ function processes(callback) {
|
||||
}
|
||||
if (result.substr(0, 1) !== '[') {
|
||||
let parts = result.split('/');
|
||||
result = parts[parts.length - 1];
|
||||
if (isNaN(parseInt(parts[parts.length - 1]))) {
|
||||
result = parts[parts.length - 1];
|
||||
} else {
|
||||
result = parts[0];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user