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 f3f850e commit 12b0aa8Copy full SHA for 12b0aa8
test/fileutils/test_fileutils.rb
@@ -742,13 +742,14 @@ def test_remove_entry_secure
742
assert_file_not_exist 'tmp/tmpdir/c'
743
744
File.chmod(01777, 'tmp/tmpdir')
745
- Dir.mkdir 'tmp/tmpdir/d', 0
746
- assert_raise(Errno::EACCES) {remove_entry_secure 'tmp/tmpdir/d'}
747
- File.chmod 0777, 'tmp/tmpdir/d'
748
- Dir.rmdir 'tmp/tmpdir/d'
+ 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'
749
+ Dir.rmdir 'tmp/tmpdir/d'
750
+ end
751
752
Dir.rmdir 'tmp/tmpdir'
-
753
end
754
755
def test_remove_entry_secure_symlink
0 commit comments