We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70f21e8 commit bc3280aCopy full SHA for bc3280a
test/fileutils/test_fileutils.rb
@@ -741,12 +741,14 @@ def test_remove_entry_secure
741
assert_file_not_exist 'tmp/tmpdir/a'
742
assert_file_not_exist 'tmp/tmpdir/c'
743
744
- File.chmod(01777, 'tmp/tmpdir')
745
- if File.sticky?('tmp/tmpdir')
746
- Dir.mkdir 'tmp/tmpdir/d', 0
747
- assert_raise(Errno::EACCES) {remove_entry_secure 'tmp/tmpdir/d'}
748
- File.chmod 0777, 'tmp/tmpdir/d'
749
- Dir.rmdir 'tmp/tmpdir/d'
+ unless root_in_posix?
+ File.chmod(01777, 'tmp/tmpdir')
+ if File.sticky?('tmp/tmpdir')
+ Dir.mkdir 'tmp/tmpdir/d', 0
+ assert_raise(Errno::EACCES) {remove_entry_secure 'tmp/tmpdir/d'}
+ File.chmod 0777, 'tmp/tmpdir/d'
750
+ Dir.rmdir 'tmp/tmpdir/d'
751
+ end
752
end
753
754
Dir.rmdir 'tmp/tmpdir'
0 commit comments