Skip to content

Commit 288d193

Browse files
committed
Make dot/dot-dot directory checks more consistent
1 parent 7689f30 commit 288d193

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net/sftp/operations/dir.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def glob(path, pattern, flags=0)
6060
path = path.chop if path.end_with?('/') && path != '/'
6161

6262
results = [] unless block_given?
63-
queue = entries(path).reject { |e| e.name == "." || e.name == ".." }
63+
queue = entries(path).reject { |e| %w(. ..).include?(e.name) }
6464
while queue.any?
6565
entry = queue.shift
6666

0 commit comments

Comments
 (0)