SALOMEDS::TMPFile_var aStreamFile;
// Get a temporary directory to store a file
std::string aTmpDir = (isMultiFile)?theURL:SALOMEDS_Tool::GetTmpDir();
+
+ // OCCT BUG: cannot save a document (in current folder)
+ // if directory name is empty
+ if (aTmpDir.size() == 0) {
+#ifdef WNT
+ aTmpDir = ".\\";
+#else
+ aTmpDir = "./";
+#endif
+ }
+
// Create a list to store names of created files
SALOMEDS::ListOfFileNames_var aSeq = new SALOMEDS::ListOfFileNames;
aSeq->length(1);
// Get a temporary directory for a file
std::string aTmpDir = isMultiFile?theURL:SALOMEDS_Tool::GetTmpDir();
+
+ // OCCT BUG: cannot load a document (from current folder)
+ // if directory name is empty
+ if (aTmpDir.size() == 0) {
+#ifdef WNT
+ aTmpDir = ".\\";
+#else
+ aTmpDir = "./";
+#endif
+ }
+
// Conver the byte stream theStream to a file and place it in tmp directory
- SALOMEDS::ListOfFileNames_var aSeq = SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir.c_str(), isMultiFile);
+ SALOMEDS::ListOfFileNames_var aSeq =
+ SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir.c_str(), isMultiFile);
// Prepare a file name to open
TCollection_AsciiString aNameWithExt("");