avoid 'recursive_find' over directory symlink
this could cause an endless recursion if a symlink pointed upwards in the file tree
This commit is contained in:
parent
4bfa4a625d
commit
cfc08acd15
@ -41,7 +41,7 @@ module Cmdtest
|
||||
next if entry == ".."
|
||||
path = File.join(dir, entry)
|
||||
relpath = prefix + entry
|
||||
if File.directory?(path)
|
||||
if ! File.symlink?(path) && File.directory?(path)
|
||||
ignore2 = yield ignore, relpath
|
||||
recursive_find(ignore2, relpath + "/", path, &block)
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user