Skip to content

Commit cea61e7

Browse files
committed
Fix bug with remove_from_cache
1 parent 1686b82 commit cea61e7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/msf/core/modules/metadata/cache.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,12 @@ def get_unchanged_module_references
107107
#######
108108

109109
def remove_from_cache(module_name)
110-
removed = @module_metadata_cache.delete_if {|_, module_metadata|
110+
old_cache_size = @module_metadata_cache.size
111+
@module_metadata_cache.delete_if {|_, module_metadata|
111112
module_metadata.ref_name.eql? module_name
112113
}
113114

114-
return !removed.empty?
115+
return old_cache_size != @module_metadata_cache.size
115116
end
116117

117118
def wait_for_load

0 commit comments

Comments
 (0)