Implement `Zip::FileSystem::ZipFsFile#symlink?`
This commit is contained in:
parent
ffa90a37cb
commit
8b87b0e200
|
@ -197,8 +197,8 @@ module Zip
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
def symlink?(_filename)
|
def symlink?(filename)
|
||||||
false
|
@mapped_zip.get_entry(filename).symlink?
|
||||||
end
|
end
|
||||||
|
|
||||||
def socket?(_filename)
|
def socket?(_filename)
|
||||||
|
|
|
@ -186,7 +186,9 @@ class FileNonmutatingTest < MiniTest::Test
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_symlink?
|
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
|
end
|
||||||
|
|
||||||
def test_socket?
|
def test_socket?
|
||||||
|
|
Loading…
Reference in New Issue