From a52bf4526d1aa1c8f491d732cb7eaf90e114f93e Mon Sep 17 00:00:00 2001 From: William Vu Date: Wed, 22 Jul 2015 14:25:49 -0500 Subject: [PATCH] Use uniq on the globs array This avoids search repetition. --- .../post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb index 272b4fc6c2..038e35a54d 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb @@ -146,7 +146,7 @@ class Console::CommandDispatcher::Stdapi::Fs return end - globs.each do |glob| + globs.uniq.each do |glob| files += client.fs.file.search(root, glob, recurse) end