Skip to content

Commit cc347b6

Browse files
committed
fix: wrong sdata filesystem path detection
1 parent 3c25e7b commit cc347b6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tools/gltf_importer/src/writer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ namespace {
4949
};
5050

5151
std::string getRomPath(const std::string &path) {
52-
if(path.find("filesystem/") == 0) {
53-
return std::string("rom:/") + path.substr(11);
52+
std::string basDir = "filesystem/";
53+
auto fsPos = path.find(basDir);
54+
if(fsPos != std::string::npos) {
55+
return std::string("rom:/") + path.substr(fsPos + basDir.length());
5456
}
5557
return path;
5658
}

0 commit comments

Comments
 (0)