Fix Entry.new in YAML::Serializable to support DirectyEntry

so hacky
This commit is contained in:
Leeingnyo 2022-05-15 16:12:43 +09:00
parent 137e84dfb6
commit caf4cfb6cd

View File

@ -14,7 +14,11 @@ abstract class Entry
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
# TODO: check node? and select proper subclass
begin
ZippedEntry.new ctx, node
rescue e
DirectoryEntry.new ctx, node
end
end
def build_json(*, slim = false)