Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with account name replacement #6

Open
dicosta opened this issue Sep 6, 2017 · 2 comments
Open

issue with account name replacement #6

dicosta opened this issue Sep 6, 2017 · 2 comments

Comments

@dicosta
Copy link

dicosta commented Sep 6, 2017

Hi!
First of all thanks for making this lib open, learned a bunch from your code and your blog posts.
I was having an issue with opening/writing pins.
Looks like the bridge is reading files from 'DefaultAccount', but I was running an app with my 'administrator' account (note lowercase a at the start), so it is writing to administrator/Packages
Line 29 in GPioController is doing the replacement for 'Administrator'. Maybe lowercase comparation is needed here

(Running a Pi 2 B with Win 10.0.15063.0)

Thanks!

Regards,
Diego

@barkermn01
Copy link
Contributor

barkermn01 commented Sep 11, 2017

I think this is down to your setup most ppl don't create a standard user account called "administrator" but as for your case sensitivity you can use Regex to be case sensitive so change line 29 to

localAppData = Regex.Replace(localAppData, "Administator", "DefaultAccount");

@dicosta If you think it's worth while this being added to the code base fork it change it, commit the change and create a pull request.

@jeremylindsayni
Copy link
Owner

Hey - thank you @dicosta and @barkermn01 for the discussion! Sorry I haven't been as active on this as usual, new baby in the house and things are a bit hectic....

You are right @dicosta - having this hardcoded is probably (well definitely) not the best way to manage the user account. I hope that the workaround from @barkermn01 helps - I'll have a think how best to refactor this code to make it independent of the username, or at least parameterise it.

Thanks again!
Jeremy

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

No branches or pull requests

3 participants