Skip to content

Commit

Permalink
symlink: don't warn on Windows symlink failure (fix #37845)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Oct 2, 2020
1 parent 17ab43e commit 75732a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -977,12 +977,13 @@ function symlink(p::AbstractString, np::AbstractString)
end
end
err = ccall(:jl_fs_symlink, Int32, (Cstring, Cstring, Cint), p, np, flags)
sym = "symlink"
@static if Sys.iswindows()
if err < 0 && !isdir(p)
@warn "On Windows, creating file symlinks requires Administrator privileges" maxlog=1 _group=:file
sym = "On Windows, creating symlinks requires Administrator privileges.\nsymlink"
end
end
uv_error("symlink",err)
uv_error(sym, err)
end

"""
Expand Down

0 comments on commit 75732a4

Please sign in to comment.