Fix faulty option.

This commit is contained in:
Karchnu 2020-11-01 17:29:16 +01:00
parent d33e69faa3
commit 1c311178e6

View File

@ -23,8 +23,9 @@ class FileStorage::Request
raise NotLoggedException.new if user.nil? raise NotLoggedException.new if user.nil?
if filestoraged.faulty if filestoraged.faulty
if @faulty_nb == 4 filestoraged.faulty_nb += 1
@faulty_nb = 0 if filestoraged.faulty_nb == 4
filestoraged.faulty_nb = 0
raise "FAULTY" raise "FAULTY"
end end
end end