diff --git a/deps/nostalgia/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp b/deps/nostalgia/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp index fbf960b..d6f3cf9 100644 --- a/deps/nostalgia/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/nostalgia/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp @@ -93,7 +93,9 @@ Result PassThroughFS::statPath(StringViewCR path) const noexcept { oxTracef("ox.fs.PassThroughFS.statInode", "{} {}", ec.message(), path); const uint64_t size = type == FileType::Directory ? 0 : std::filesystem::file_size(p, ec); oxTracef("ox.fs.PassThroughFS.statInode.size", "{} {}", path, size); - OX_RETURN_ERROR(ox::Error(static_cast(ec.value()), "PassThroughFS: stat failed")); + if (auto err = ec.value()) { + return ox::Error{static_cast(err), "PassThroughFS: stat failed"}; + } return FileStat{0, 0, size, type}; }