Porting Python3: Encode URL

This commit is contained in:
Gilles DAVID 2017-06-06 14:33:13 +02:00
parent bf9ebfec9f
commit 90f8a73955

View 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";