Add first version of UNCPath#12
Add first version of UNCPath#12jannefiluren wants to merge 2 commits intorofinn:masterfrom jannefiluren:jm/uncpath
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12 +/- ##
==========================================
- Coverage 76.37% 70.86% -5.52%
==========================================
Files 8 9 +1
Lines 419 453 +34
==========================================
+ Hits 320 321 +1
- Misses 99 132 +33
Continue to review full report at Codecov.
|
|
I've commented on julia-vscode/julia-vscode#490 to get a clearer understanding of the specific requirements. Having a better picture of your requirements and what level of UNC support needed should help us:
|
|
So I think we should not introduce a new type here, but instead just represent them as |
|
I have no preferences how to solve this problem. What I see is that UNC paths seems to be handled poorly with Julia base too. Here is one example: julia> cd("//hdata/fou/jmg")
julia> pwd()
"\\\\hdata\\fou\\jmg"
julia> splitdrive(pwd()) # Seems wrong to me
("\\\\hdata\\fou", "\\jmg")Should I open an issue at Julia base for this stuff, or is it not supposed to work? Furthermore, when writing this PR, I had this issue: julia> UNC_PATH_START = "\\\\"
"\\\\"
julia> joinpath(UNC_PATH_START, "hdata", "fou") # Seems correct
"\\\\hdata\\fou"
julia> joinpath(UNC_PATH_START, "hdata", "fou", "jmg") # Not correct
"\\\\hdata\\foujmg"The I "solved" this issue in the PR using this line of code instead: julia> folder = UNC_PATH_START * joinpath("hdata", "fou", "jmg")
"\\\\hdata\\fou\\jmg"
julia> isdir(folder)
trueBut that seems more like a hack than a good solution. How would you like me to proceed with this PR? Happy for any advice. |
|
@rofinn and @davidanthoff: Just some info: I just read this thread on discourse. It might be relevant for handling windows paths better. Look in particular at this pull request. Also look at my comment above. |
|
I think I would just try to copy the semantics from https://github.com/python/cpython/blob/master/Lib/pathlib.py over to here... |
|
Does this work? There are a few packages that cannot be used in Windows corporate environments because depending on this |
Work in progress