Rename variable path_file => file_path
This commit is contained in:
parent
1f36d20220
commit
36491230bb
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue