[studio] Fix Project to cut off correct end of OC data
All checks were successful
Build / build (push) Successful in 2m31s
All checks were successful
Build / build (push) Successful in 2m31s
This commit is contained in:
parent
2173b12c67
commit
945a55f94a
@ -131,9 +131,12 @@ class Project {
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
ox::Error Project::writeObj(ox::StringViewCR path, T const&obj, ox::ClawFormat fmt) noexcept {
|
ox::Error Project::writeObj(ox::StringViewCR path, T const&obj, ox::ClawFormat fmt) noexcept {
|
||||||
oxRequireM(buff, ox::writeClaw(obj, fmt));
|
oxRequireM(buff, ox::writeClaw(obj, fmt));
|
||||||
|
if (fmt == ox::ClawFormat::Organic) {
|
||||||
|
buff.pop_back();
|
||||||
|
}
|
||||||
// write to FS
|
// write to FS
|
||||||
oxReturnError(mkdir(parentDir(path)));
|
oxReturnError(mkdir(parentDir(path)));
|
||||||
oxReturnError(writeBuff(path, ox::BufferView{buff} + (fmt == ox::ClawFormat::Organic)));
|
oxReturnError(writeBuff(path, buff));
|
||||||
// write type descriptor
|
// write type descriptor
|
||||||
if (m_typeStore.get<T>().error) {
|
if (m_typeStore.get<T>().error) {
|
||||||
oxReturnError(ox::buildTypeDef(m_typeStore, obj));
|
oxReturnError(ox::buildTypeDef(m_typeStore, obj));
|
||||||
|
Loading…
Reference in New Issue
Block a user