File tree Expand file tree Collapse file tree
src/mlfmu/fmu_build/templates/onnx_fmu Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ OnnxFmu::OnnxFmu(cppfmu::FMIString fmuResourceLocation)
2525 * \brief Formats the onnx path.
2626 *
2727 * Formats the onnx path by appending the ONNX_FILENAME to the given fmuResourceLocation.
28- * If the path starts with "file:/// ", it removes the "file://" prefix.
28+ * If the path starts with "file://", it removes the "file://" prefix.
2929 * This is directly stored to the class var onnxPath_.
3030 *
3131 * \param fmuResourceLocation The location of the FMU resource.
@@ -40,9 +40,9 @@ void OnnxFmu::formatOnnxPath(cppfmu::FMIString fmuResourceLocation)
4040
4141 // Remove file:// from the path if it is at the beginning
4242 std::wstring path = onnxPathStream.str ();
43- std::wstring startPath = path.substr (0 , 8 );
44- std::wstring endPath = path.substr (8 );
45- if (startPath == L" file:/// " ) {
43+ std::wstring startPath = path.substr (0 , 7 );
44+ std::wstring endPath = path.substr (7 );
45+ if (startPath == L" file://" ) {
4646 path = endPath;
4747 }
4848 // save to onnxPath_ (wstring for Windows, else string)
You can’t perform that action at this time.
0 commit comments