mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-05 00:00:44 -04:00
Remove counter, yield everytime
This commit is contained in:
@@ -73,7 +73,7 @@ class Title
|
||||
def examine(context : ExamineContext) : Bool
|
||||
return false unless Dir.exists? @dir # No title, Remove this
|
||||
contents_signature = Dir.contents_signature @dir,
|
||||
context["cached_contents_signature"], context["file_counter"]
|
||||
context["cached_contents_signature"]
|
||||
# Not changed. Reuse this
|
||||
return true if @contents_signature == contents_signature
|
||||
|
||||
@@ -112,7 +112,7 @@ class Title
|
||||
previous_entries_size = @entries.size
|
||||
@entries.select! do |entry|
|
||||
existence = File.exists? entry.zip_path
|
||||
context["file_counter"].count_and_yield
|
||||
Fiber.yield
|
||||
context["deleted_entry_ids"] << entry.id unless existence
|
||||
existence
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user