[nostalgia/tools/pack] Make toMetalClaw ensure data portion is in fact MetalClaw
This commit is contained in:
parent
5e85f18b60
commit
badd07e27f
@ -14,18 +14,22 @@
|
||||
namespace nostalgia {
|
||||
|
||||
/**
|
||||
* Convert path references to inodes to save space
|
||||
* Convert path references in Claw data to inodes to save space
|
||||
* @param buff buffer holding file
|
||||
* @return error
|
||||
* stub for now
|
||||
*/
|
||||
static ox::Result<ox::Buffer> pathToInode(const ox::Buffer &buff) noexcept {
|
||||
return ox::move(buff);
|
||||
return std::move(buff);
|
||||
}
|
||||
|
||||
// just strip header for now...
|
||||
static ox::Result<ox::Buffer> toMetalClaw(const ox::Buffer &buff) noexcept {
|
||||
return ox::stripClawHeader(buff.data(), buff.size());
|
||||
oxRequire(hdr, ox::readClawHeader(buff));
|
||||
if (hdr.fmt != ox::ClawFormat::Metal) {
|
||||
return OxError(1, "Cannot convert from Claw to MetalClaw, data portion must already be MetalClaw");
|
||||
}
|
||||
return ox::stripClawHeader(buff);
|
||||
}
|
||||
|
||||
static ox::Error doTransformations(ox::FileSystem *dest, const ox::String &filePath) noexcept {
|
||||
|
Loading…
x
Reference in New Issue
Block a user