mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -04:00
Properly close archive files after validating them
This commit is contained in:
parent
07100121ef
commit
2208f90d8e
@ -95,12 +95,16 @@ def compare_alphanumerically(a : String, b : String)
|
||||
end
|
||||
|
||||
def validate_archive(path : String) : Exception?
|
||||
file = nil
|
||||
begin
|
||||
file = ArchiveFile.new path
|
||||
file.check
|
||||
file.close
|
||||
return
|
||||
rescue e
|
||||
rescue e
|
||||
file.close unless file.nil?
|
||||
e
|
||||
end
|
||||
end
|
||||
|
||||
def random_str
|
||||
|
Loading…
x
Reference in New Issue
Block a user