Here's the test that fails, from test_fileutils.rb. It's the last 'mv'.
deftest_mv_symlinktouch'tmp/cptmp'# src==dest (2) symlink and its targetFile.symlink'cptmp','tmp/cptmp_symlink'assert_raise(ArgumentError){mv'tmp/cptmp','tmp/cptmp_symlink'}assert_raise(ArgumentError){mv'tmp/cptmp_symlink','tmp/cptmp'}# src==dest (3) looped symlinkFile.symlink'symlink','tmp/symlink'assert_raise(Errno::ELOOP){mv'tmp/symlink','tmp/symlink'}# unexist symlinkFile.symlink'xxx','tmp/src'assert_nothing_raised{mv'tmp/src','tmp/dest'}assert_equaltrue,File.symlink?('tmp/dest')endifhave_symlink?
I'm guessing that somewhere within the guts of FileUtils, it calls methods in JRuby to actually move the file (by recopying it or by doing a filesystem move) and that logic is attempting to canonicalize the path through the bad symlink.
So, this is an interesting and perhaps not too difficult one to fix. Run with jruby test/mri/runner.rb mri/fileutils/test_fileutils.rb.
The text was updated successfully, but these errors were encountered:
Here's the test that fails, from test_fileutils.rb. It's the last 'mv'.
I'm guessing that somewhere within the guts of FileUtils, it calls methods in JRuby to actually move the file (by recopying it or by doing a filesystem move) and that logic is attempting to canonicalize the path through the bad symlink.
So, this is an interesting and perhaps not too difficult one to fix. Run with
jruby test/mri/runner.rb mri/fileutils/test_fileutils.rb
.The text was updated successfully, but these errors were encountered: