-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add first version of UNCPath #12
base: master
Are you sure you want to change the base?
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)
true But 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