mdfind: Check if path is nil as well as empty

This commit is contained in:
Misty De Meo 2012-07-31 00:14:52 -03:00
parent 9af7e25e03
commit fcbee28447

View File

@ -270,7 +270,7 @@ module MacOS extend self
def mdfind attribute, id
path = `mdfind "#{attribute} == '#{id}'"`.split("\n").first
Pathname.new(path) unless path.empty?
Pathname.new(path) unless path.nil? or path.empty?
end
def pkgutil_info id