Rename variable path_file => file_path

This commit is contained in:
Mathieu Magnin 2017-10-30 17:23:55 +01:00
parent 1f36d20220
commit 36491230bb

View file

@ -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