Implement `Zip::FileSystem::ZipFsFile#symlink?`
This commit is contained in:
parent
ffa90a37cb
commit
8b87b0e200
|
@ -197,8 +197,8 @@ module Zip
|
|||
false
|
||||
end
|
||||
|
||||
def symlink?(_filename)
|
||||
false
|
||||
def symlink?(filename)
|
||||
@mapped_zip.get_entry(filename).symlink?
|
||||
end
|
||||
|
||||
def socket?(_filename)
|
||||
|
|
|
@ -186,7 +186,9 @@ class FileNonmutatingTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_symlink?
|
||||
assert_always_false(:symlink?)
|
||||
zip_file = ::Zip::File.new('test/data/path_traversal/tuzovakaoff/symlink.zip')
|
||||
assert(zip_file.file.symlink?('path'))
|
||||
assert(!zip_file.file.symlink?('path/file.txt'))
|
||||
end
|
||||
|
||||
def test_socket?
|
||||
|
|
Loading…
Reference in New Issue