Skip to content

realpath error on Windows network folder #32597

@DanBerge

Description

@DanBerge

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    filesystemUnderlying file system and functions that use itsystem:windowsAffects only Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions