Skip to content

Conversation

@Covkie
Copy link
Contributor

@Covkie Covkie commented Dec 20, 2024

i = 1 rightly skips the first index as it is commonly empty (on linux) or a drive letter (windows) but this wrongly captures single path processes on linux. This explicitly filters out those undesired first indexes instead of skipping ALL of them.

`i = 1` rightly skips the first index as it is commonly empty (on linux) or a drive letter (windows) but this wrongly captures single path processes on linux. This explicitly filters out those undesired first indexes instead of skipping ALL of them.
Milkshiift added a commit to Milkshiift/arrpc that referenced this pull request Dec 21, 2024
@Covkie Covkie requested a review from CanadaHonk February 7, 2025 00:30
const path = _path.toLowerCase().replaceAll('\\', '/');
for (const [ pid, path, args ] of processes) {
const splitPath = path.toLowerCase().replaceAll('\\', '/').split('/');
if ((splitPath[0] == 2 && splitPath[0].endsWith(':') || splitPath[0] == "")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably meant to use length here

Suggested change
if ((splitPath[0] == 2 && splitPath[0].endsWith(':') || splitPath[0] == "")) {
if ((splitPath[0].length == 2 && splitPath[0].endsWith(':') || splitPath[0] == "")) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants