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

realpath error on Windows network folder #32597

Closed
DanBerge opened this issue Jul 16, 2019 · 1 comment · Fixed by #33116
Closed

realpath error on Windows network folder #32597

DanBerge opened this issue Jul 16, 2019 · 1 comment · Fixed by #33116
Labels
domain:filesystem Underlying file system and functions that use it system:windows Affects only Windows

Comments

@DanBerge
Copy link

DanBerge commented Jul 16, 2019

realpath fails on Windows when resolving the full UNC path in certain cases. I suspect it's happen when the server folder is a sub-directory of a locked folder.

A non-locked folder works just fine, in this case "Shared" is not locked.

realpath("J:\\")
"UNC\\ServerName\Shared\\"

In the case of a locked folder it errors, in this case "Home" is a locked folder, and the expected return should be "UNC\\ServerName\Home\Username".

realpath("H:\\")
ERROR: SystemError: realpath: The operation completed successfully.
Stacktrace:
 [1] #windowserror#45(::Nothing, ::typeof(Base.windowserror), ::Symbol, ::Bool) at .\error.jl:148
 [2] windowserror at .\error.jl:148 [inlined]
 [3] realpath(::String) at .\path.jl:351
 [4] top-level scope at REPL[30]:1

From what I understand, on Windows Server the contents of a locked folder are only viable to the Administrator, but sub-folders can still be viewed with the proper permissions. It is done so that other users can't discover the existence of sub-directories.

The underlying library and function was changed per discussion in #30588. See also #32298.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 12, 2019

I'm not sure of the full issue here, but note the first result should be \\ServerName\Shared\\ (without the UNC prefix), where we're incorrectly processing the return value there.

@fredrikekre fredrikekre added the domain:filesystem Underlying file system and functions that use it label Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:filesystem Underlying file system and functions that use it system:windows Affects only Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants