remove redundant check in extract_entry

pull/13387/head
Delyan Angelov 2022-02-17 23:29:27 +02:00
parent 7a82b4b17b
commit 9743c14949
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 0 additions and 3 deletions

View File

@ -222,9 +222,6 @@ pub fn (mut zentry Zip) read_entry_buf(buf voidptr, in_bsize int) ?int {
// extract_entry extracts the current zip entry into output file. // extract_entry extracts the current zip entry into output file.
pub fn (mut zentry Zip) extract_entry(path string) ? { pub fn (mut zentry Zip) extract_entry(path string) ? {
if !os.is_file(path) {
return error('szip: cannot open file for extracting, "$path" not exists')
}
res := C.zip_entry_fread(zentry, &char(path.str)) res := C.zip_entry_fread(zentry, &char(path.str))
if res != 0 { if res != 0 {
return error('szip: failed to extract entry') return error('szip: failed to extract entry')