Fix faulty option.

dev
Karchnu 2020-11-01 17:29:16 +01:00
parent d33e69faa3
commit 1c311178e6
1 changed files with 3 additions and 2 deletions

View File

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