]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Porting Python3: Encode URL
authorGilles DAVID <gilles-g.david@edf.fr>
Tue, 6 Jun 2017 12:33:13 +0000 (14:33 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Tue, 6 Jun 2017 12:33:13 +0000 (14:33 +0200)
src/SMESH_I/SMESH_Gen_i.cxx

index 829ba8e6ea00183713512181be8bd17122f40c4f..7a3404d242568566aa7859c680cf3bcc313cba72 100644 (file)
@@ -3033,7 +3033,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
 
   TCollection_AsciiString aStudyName( "" );
   if ( isMultiFile )
-    aStudyName = ( (char*)SALOMEDS_Tool::GetNameFromPath( myCurrentStudy->URL() ).c_str() );
+    aStudyName = ( (char*)SALOMEDS_Tool::GetNameFromPath( Kernel_Utils::encode(myCurrentStudy->URL()) ).c_str() );
 
   // Set names of temporary files
   TCollection_AsciiString filename =
@@ -4038,8 +4038,8 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
                                                                             isMultiFile );
   TCollection_AsciiString aStudyName( "" );
   if ( isMultiFile ) {
-    CORBA::String_var url = myCurrentStudy->URL();
-    aStudyName = (char*)SALOMEDS_Tool::GetNameFromPath( url.in() ).c_str();
+    CORBA::WString_var url = myCurrentStudy->URL();
+    aStudyName = (char*)SALOMEDS_Tool::GetNameFromPath( Kernel_Utils::encode(url.in()) ).c_str();
   }
   // Set names of temporary files
   TCollection_AsciiString filename = tmpDir + aStudyName + "_SMESH.hdf";