diff --git a/app/services/clamav_service.rb b/app/services/clamav_service.rb index 022f02de1..7c7e9be67 100644 --- a/app/services/clamav_service.rb +++ b/app/services/clamav_service.rb @@ -1,13 +1,13 @@ class ClamavService - def self.safe_file? path_file + def self.safe_file? file_path if Rails.env == 'development' return CLAMAV[:response] if CLAMAV[:mock?] end - FileUtils.chmod 0666, path_file + FileUtils.chmod 0666, file_path client = ClamAV::Client.new - response = client.execute(ClamAV::Commands::ScanCommand.new(path_file)) + response = client.execute(ClamAV::Commands::ScanCommand.new(file_path)) return false if response.first.class == ClamAV::VirusResponse true