From: mpv Date: Thu, 11 Sep 2014 11:15:21 +0000 (+0400) Subject: Remove extra directory separators on save (reproduced in SALOME) X-Git-Tag: V_0.4.4~72^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6050dbcb2a56bf08658e26897b93ccf7a8789af6;p=modules%2Fshaper.git Remove extra directory separators on save (reproduced in SALOME) --- 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