Rename dir parameter in Dir.match to match_dir to make more sense with new changes

This commit is contained in:
Grant Willcox 2021-11-15 10:50:11 -06:00
parent 7bf75c0de5
commit e6f38b3226
No known key found for this signature in database
GPG Key ID: D35E05C0F2B81E83
1 changed files with 3 additions and 3 deletions

View File

@ -122,9 +122,9 @@ class Dir < Rex::Post::Dir
#
# Enumerates all of the files and folders matched with name.
# When option dir is true, return matched folders.
# When option match_dir is true, return matched folders.
#
def Dir.match(name, dir = false)
def Dir.match(name, match_dir = false)
path = name + '*'
files = []
sbuf = nil
@ -157,7 +157,7 @@ class Dir < Rex::Post::Dir
st.update32(sbuf[idx].value)
end
is_dir = st.ftype == 'directory'
next if (dir && !is_dir) # if file_name isn't directory
next if (match_dir && !is_dir) # if file_name isn't directory
end
if !file_name.value.end_with?('.', '\\', '/') # Exclude current and parent directory