[keel] Remove use of removed ModelValue operator
All checks were successful
Build / build (push) Successful in 2m24s
All checks were successful
Build / build (push) Successful in 2m24s
This commit is contained in:
parent
74fb051ef2
commit
db2dc28f92
@ -14,15 +14,15 @@ namespace keel {
|
||||
static ox::Error pathToInode(
|
||||
keel::Context &ctx, ox::FileSystem &dest, ox::ModelObject &obj) noexcept {
|
||||
auto &o = obj;
|
||||
auto type = static_cast<ox::FileAddressType>(o["type"].get<int8_t>());
|
||||
auto &data = o["data"].get<ox::ModelUnion>();
|
||||
auto type = static_cast<ox::FileAddressType>(o.at("type").unwrap()->get<int8_t>());
|
||||
auto &data = o.at("data").unwrap()->get<ox::ModelUnion>();
|
||||
ox::String path;
|
||||
switch (type) {
|
||||
case ox::FileAddressType::Path:
|
||||
path = data["path"].get<ox::String>();
|
||||
path = data.at("path").unwrap()->get<ox::String>();
|
||||
break;
|
||||
case ox::FileAddressType::ConstPath:
|
||||
path = data["constPath"].get<ox::String>();
|
||||
path = data.at("constPath").unwrap()->get<ox::String>();
|
||||
break;
|
||||
case ox::FileAddressType::Inode:
|
||||
case ox::FileAddressType::None:
|
||||
@ -33,7 +33,7 @@ static ox::Error pathToInode(
|
||||
oxReturnError(keel::uuidToPath(ctx, uuid).moveTo(path));
|
||||
}
|
||||
oxRequire(s, dest.stat(path));
|
||||
oxReturnError(o["type"].set(static_cast<int8_t>(ox::FileAddressType::Inode)));
|
||||
oxReturnError(o.at("type").unwrap()->set(static_cast<int8_t>(ox::FileAddressType::Inode)));
|
||||
oxOutf("path to inode: {} => {}\n", path, s.inode);
|
||||
return data.set(2, s.inode);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user