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

fix for extra back slashes for windows UNC paths #1044

Open
wants to merge 2 commits into
base: master
from

Conversation

@HudsonMC16
Copy link

@HudsonMC16 HudsonMC16 commented Jul 27, 2020

This is to address UNC paths breaking, as discussed in issue #1019

Copy link
Member

@Byron Byron left a comment

Thanks a lot for giving it a go. While looking at it, I came up with a concern that we could talk about before merging.

@@ -419,6 +419,8 @@ def string_decode(v):
optval = string_decode(optval[1:])
# end handle multi-line
# preserves multiple values for duplicate optnames
# fix for extra back slashes so windows UNC paths are not mangled
optval = optval.replace('\\\\', '\\')

This comment has been minimized.

@Byron

Byron Aug 4, 2020
Member

Have you checked what happens if that file is written back to disk?
Maybe this change could be constrained to files that are open for reading only (if this is even known).

Otherwise I fear that writing such a mangled file back, for example because some other value changed, will cause it to become invalid for some users.

What is your thoughts on this?

This comment has been minimized.

@HudsonMC16

HudsonMC16 Aug 4, 2020
Author

It looks like it might be platform dependent. Config entries get written here and the defenc encoding is determined here. I'll test it on my win10 machine, and if it works, we might wrap that replace call in an if is_win: statement as a precaution.

@Byron
Copy link
Member

@Byron Byron commented Sep 4, 2020

@HudsonMC16 I reworded the contribution guidelines to make clear adding oneself to the AUTHORS file is not a requirement at all.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.