diff --git a/src/olympic/studio/modlib/include/studio/project.hpp b/src/olympic/studio/modlib/include/studio/project.hpp index 140cb9ee..203cf1df 100644 --- a/src/olympic/studio/modlib/include/studio/project.hpp +++ b/src/olympic/studio/modlib/include/studio/project.hpp @@ -131,9 +131,12 @@ class Project { template ox::Error Project::writeObj(ox::StringViewCR path, T const&obj, ox::ClawFormat fmt) noexcept { oxRequireM(buff, ox::writeClaw(obj, fmt)); + if (fmt == ox::ClawFormat::Organic) { + buff.pop_back(); + } // write to FS oxReturnError(mkdir(parentDir(path))); - oxReturnError(writeBuff(path, ox::BufferView{buff} + (fmt == ox::ClawFormat::Organic))); + oxReturnError(writeBuff(path, buff)); // write type descriptor if (m_typeStore.get().error) { oxReturnError(ox::buildTypeDef(m_typeStore, obj));