Fix Dir.contents_signature to detect valid image files added

This commit is contained in:
Leeingnyo 2022-06-18 17:43:26 +09:00
parent 2d97faa7c0
commit bbc0c2cbb7

View File

@ -64,11 +64,10 @@ class Dir
path = File.join dirname, fn path = File.join dirname, fn
if File.directory? path if File.directory? path
signatures << Dir.contents_signature path, cache signatures << Dir.contents_signature path, cache
signatures << fn if DirEntry.is_valid? path
else else
# Only add its signature value to `signatures` when it is a # Only add its signature value to `signatures` when it is a
# supported file # supported file
signatures << fn if ArchiveEntry.is_valid? fn signatures << fn if ArchiveEntry.is_valid?(fn) || is_supported_image_file(fn)
end end
Fiber.yield Fiber.yield
end end