Method: Chef::Resource::WindowsDefenderExclusion#to_consistent_path_array

Defined in:
lib/chef/resource/windows_defender_exclusion.rb

#to_consistent_path_array(x) ⇒ Object



61
62
63
64
65
66
67
# File 'lib/chef/resource/windows_defender_exclusion.rb', line 61

def to_consistent_path_array(x)
  fixed = x.dup || []
  fixed = fixed.split(/\s*,\s*/) if fixed.is_a?(String)
  fixed.map!(&:downcase)
  fixed.map! { |v| v.gsub(%r{/}, "\\") }
  fixed
end