From 6050dbcb2a56bf08658e26897b93ccf7a8789af6 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 11 Sep 2014 15:15:21 +0400 Subject: [PATCH] Remove extra directory separators on save (reproduced in SALOME) --- src/Model/Model_Document.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 11a7eaa20..7a2ca8542 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -65,6 +65,9 @@ Model_Document::Model_Document(const std::string theID) static TCollection_ExtendedString DocFileName(const char* theFileName, const std::string& theID) { TCollection_ExtendedString aPath((const Standard_CString) theFileName); + // remove end-separators + while(aPath.Length() && (aPath.Value(aPath.Length()) == '\\' || aPath.Value(aPath.Length()) == '/')) + aPath.Remove(aPath.Length()); aPath += _separator_; aPath += theID.c_str(); aPath += ".cbf"; // standard binary file extension -- 2.39.2