mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-26 18:30:52 +01:00
Bugfix windows port checker
This commit is contained in:
parent
0c74260503
commit
0a7488f6d4
@ -18,7 +18,7 @@ public class WindowsPortChecker implements PortChecker{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getProcessNameFromPid(String pid) throws IOException {
|
private String getProcessNameFromPid(String pid) throws IOException {
|
||||||
String task = getCommandOutput(new String[] {"tasklist /fi \"pid eq " + pid + "\" /nh /fo:CSV"});
|
String task = getCommandOutput(new String[] {"cmd", "/c", "tasklist", "/fi", String.format("pid eq %s", pid) ,"/nh", "/fo:CSV"});
|
||||||
int index = task.indexOf(',');
|
int index = task.indexOf(',');
|
||||||
return task.substring(0, index);
|
return task.substring(0, index);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user