Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/ruby/jruby/kernel/file.rb
Original file line number Diff line number Diff line change
@@ -112,7 +112,11 @@ def self.symlink(target, link)
wtarget = target.wincode

unless CreateSymbolicLinkW(wlink, wtarget, flags)
raise SystemCallError.new('CreateSymbolicLink', FFI.errno)
errno = FFI.errno
# FIXME: in MRI all win calling methods call into a large map between windows errors and unixy ones. We
# need to add that map or possibly expost whatever we have in jnr-posix
raise Errno::EACCES.new('File.symlink') if errno == 1314 # ERROR_PRIVILEGE_NOT_HELD
raise SystemCallError.new('File.symlink', errno)
end

0 # Comply with spec

0 comments on commit b9b2e20

Please sign in to comment.