update ignore logic to allow paths to start with /, end with /, and include / in the middle
This commit is contained in:
parent
96010f2590
commit
68cd8c27cc
@ -5,6 +5,12 @@ module Svi
|
||||
|
||||
def is_path_ignored?(path, config)
|
||||
config.ignores.find do |ignore_pattern|
|
||||
ignore_pattern.chomp!("/")
|
||||
if ignore_pattern.start_with?("/")
|
||||
ignore_pattern = ignore_pattern[1, ignore_pattern.size]
|
||||
elsif not ignore_pattern["/"]
|
||||
path = File.basename(path)
|
||||
end
|
||||
File.fnmatch(ignore_pattern, path, File::FNM_PATHNAME)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user