Commit f1cbf51
Changed files (1)
lib
spandx
core
lib/spandx/core/parser.rb
@@ -21,7 +21,7 @@ module Spandx
include Registerable
def for(path)
- return UNKNOWN if File.size(path).zero?
+ return UNKNOWN if !File.exist?(path) || File.size(path).zero?
find { |x| x.matches?(File.basename(path)) } || UNKNOWN
end