Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/process/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ export default class ProcessServer {

// log(`got processed in ${(performance.now() - startTime).toFixed(2)}ms`);

for (const [ pid, _path, args ] of processes) {
const path = _path.toLowerCase().replaceAll('\\', '/');
for (const [ pid, path, args ] of processes) {
const splitPath = path.toLowerCase().replaceAll('\\', '/').split('/');
if ((/^[a-z]:$/.test(splitPath[0]) || splitPath[0] == "")) {
splitPath.shift(); // drop the first index if its a drive letter or empty
}

const toCompare = [];
const splitPath = path.split('/');
for (let i = 1; i < splitPath.length; i++) {
for (let i = 0; i < splitPath.length; i++) {
toCompare.push(splitPath.slice(-i).join('/'));
}

Expand Down