]> OCCT Git - occt-copy.git/commitdiff
0030761: Application Framework - HOMEDRIVE and TEMP are undefined on UWP
authormpv <mpv@opencascade.com>
Mon, 3 Jun 2019 13:05:25 +0000 (16:05 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 13 Jun 2019 17:18:28 +0000 (20:18 +0300)
Avoid CDF_Stroe to find default folder since there is no case where this folder does not reset to exact value given by the user.
Also, remove the exception raising for the case this method is called from outside.

src/CDF/CDF_FWOSDriver.cxx
src/CDF/CDF_Store.cxx

index a8c84c32634b5221f6c15077b9942c163e3e81aa..b555fdab34a92de137319c769378967e7a883842 100644 (file)
@@ -180,7 +180,7 @@ TCollection_ExtendedString CDF_FWOSDriver::DefaultFolder()
     else {
       theDefaultFolder=UTL::xgetenv("TEMP");
       if(theDefaultFolder.Length()==0)
-        throw Standard_Failure("cannot determine default folder; HOMEDRIVE and TEMP are undefined");
+        theDefaultFolder = ".";
     }
 #else
     TCollection_ExtendedString home=UTL::xgetenv("HOME");
index 74baa5e14824645d1f9830125268168efce4c28c..60c780bf702a169ada98fc524daa35123e6ceeaa 100644 (file)
@@ -46,10 +46,7 @@ void CDF_Store::Init() {
   myCurrentDocument = myMainDocument;
   myList = new CDF_StoreList(myCurrentDocument);
 
-  myIsMainDocument = Standard_True;
-  FindDefault();
-
-// getting the subcomponents.
+  // getting the subcomponents.
   //
   myIsMainDocument = Standard_False;
   myList->Init();