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
|
class ClamavService
|
||||||
def self.safe_file? path_file
|
def self.safe_file? file_path
|
||||||
if Rails.env == 'development'
|
if Rails.env == 'development'
|
||||||
return CLAMAV[:response] if CLAMAV[:mock?]
|
return CLAMAV[:response] if CLAMAV[:mock?]
|
||||||
end
|
end
|
||||||
|
|
||||||
FileUtils.chmod 0666, path_file
|
FileUtils.chmod 0666, file_path
|
||||||
|
|
||||||
client = ClamAV::Client.new
|
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
|
return false if response.first.class == ClamAV::VirusResponse
|
||||||
true
|
true
|
||||||
|
|
Loading…
Reference in a new issue