From d4ed6a30c22fd2387e59dc147ed9be2353d7cfab Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sun, 10 Aug 2014 18:53:46 -0700 Subject: [PATCH] no virus scan check for travis --- models/site.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/site.rb b/models/site.rb index 23301977..98ff1063 100644 --- a/models/site.rb +++ b/models/site.rb @@ -270,6 +270,9 @@ class Site < Sequel::Model return false unless (Site::VALID_MIME_TYPES.include?(mime_type) || mime_type =~ /text/) && Site::VALID_EXTENSIONS.include?(File.extname(uploaded_file[:filename]).sub(/^./, '').downcase) + # clamdscan doesn't work on travis for testing + return true if ENV['TRAVIS'] == 'true' + File.chmod 0640, uploaded_file[:tempfile].path line = Cocaine::CommandLine.new( "clamdscan", "-i --remove=no --no-summary --stdout :path",