Salome HOME
Fix incorrect naming of features and results when import (same name of feature and...
[modules/shaper.git] / src / Model / Model_Document.cpp
index 216acecd7a7a3e73fdaf670cf1cb24e95f3f3e27..2e01c4d9d8b78725ab7562da6c2e57235babe0cc 100644 (file)
@@ -437,7 +437,7 @@ static bool saveDocument(Handle(Model_Application) theApp,
     aPathToFile.SetName("");
     aPathToFile.SetExtension("");
     OSD_Directory aBaseDir(aPathToFile);
-    if (!aBaseDir.Exists())
+    if (aPathToFile.TrekLength() != 0 && !aBaseDir.Exists())
       aBaseDir.Build(OSD_Protection());
     // save the document
     aStatus = theApp->SaveAs(theDoc, theFilename);