Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Added Windows backslash normalization for instance id's. #73

Merged
merged 1 commit into from
Nov 24, 2018

Conversation

LanetheGreat
Copy link
Contributor

@LanetheGreat LanetheGreat commented Nov 14, 2018

Created a local function to normalize slashes in a device's instance id after a call to SetupDiGetDeviceInstanceId and used it after each necessary call.

Closes #64

Copy link
Owner

@MadLittleMods MadLittleMods left a comment

Choose a reason for hiding this comment

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

Have you tested this out locally?

*c = '\\';
c++;
}
}
Copy link
Owner

Choose a reason for hiding this comment

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

I see this matches the existing ToUpper pattern just above, seems good 🤷‍♀️

@LanetheGreat
Copy link
Contributor Author

I tested it locally in the app I'm working on still and it hasn't failed yet at picking up on any of our Symbol scanners. Not sure if this will have any impact on other devices since I don't know if any other brand of scanners use a slash in their devices' id's.

@MadLittleMods MadLittleMods merged commit 6f4ac13 into MadLittleMods:master Nov 24, 2018
MadLittleMods added a commit that referenced this pull request Nov 24, 2018
@MadLittleMods
Copy link
Owner

MadLittleMods commented Nov 24, 2018

Thanks @LanetheGreat! Seems to behave normally for my devices in testing. This is shipped in v4.1.0 and will be published to npm in a bit when the prebuilds from CI are done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants