]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Remove extra directory separators on save (reproduced in SALOME)
authormpv <mikhail.ponikarov@opencascade.com>
Thu, 11 Sep 2014 11:15:21 +0000 (15:15 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Thu, 11 Sep 2014 11:15:21 +0000 (15:15 +0400)
src/Model/Model_Document.cpp

index 11a7eaa20b745669cdd1d6de2e933626532a8345..7a2ca8542a9ca14ef1ebd0337d6b68861e57cd3b 100644 (file)
@@ -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