Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfix for extra back slashes for windows UNC paths #1044
Conversation
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('\\\\', '\\') |
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?
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?
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.
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.
@HudsonMC16 I reworded the contribution guidelines to make clear adding oneself to the AUTHORS file is not a requirement at all. |
This is to address UNC paths breaking, as discussed in issue #1019