processes() optimized parsing ps name

This commit is contained in:
Sebastian Hildebrandt 2018-08-03 14:36:37 +02:00
parent 8af747e8e9
commit 52e02d70a7

View File

@ -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;
}