mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
catch clamav crashes and skip to avoid upload failure
This commit is contained in:
parent
10018c5124
commit
8b762bb786
1 changed files with 6 additions and 1 deletions
|
@ -711,7 +711,12 @@ class Site < Sequel::Model
|
|||
expected_outcodes: [0, 1]
|
||||
)
|
||||
|
||||
output = line.run path: uploaded_file[:tempfile].path
|
||||
begin
|
||||
output = line.run path: uploaded_file[:tempfile].path
|
||||
rescue Terrapin::ExitStatusError => e
|
||||
puts "WARNING: CLAMAV FAILED #{username} #{uploaded_file[:tempfile].path} #{e.message}"
|
||||
return true
|
||||
end
|
||||
|
||||
return true if output == ''
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue