rake: fix images:manifest task to handle corrupted files.

This commit is contained in:
evazion
2021-03-20 05:30:06 -05:00
parent 6879fe73db
commit 048171fe29

View File

@@ -20,6 +20,16 @@ namespace :images do
h: file.height,
}
puts hash.to_json
rescue StandardError => e
hash = {
path: File.absolute_path(path),
name: File.basename(path, ".*"),
md5: file.md5,
size: file.file_size,
error: e.message,
}
puts hash.to_json
end
end