From: prascle Date: Thu, 19 Feb 2009 16:12:11 +0000 (+0000) Subject: PR: bug 20152 X-Git-Tag: V5_1_1a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=13b21bdfc597cddb44d38a635506d58104757fd4;p=modules%2Fkernel.git PR: bug 20152 --- diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index ab6eece0a..33e94851b 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -518,7 +518,8 @@ SALOME_NamingService::ResolveComponent(const char* hostname, else { SCRUTE(name); - if (Change_Directory(name.c_str())) + string basename = name; + if (Change_Directory(basename.c_str())) { vector contList = list_subdirs(); @@ -542,6 +543,8 @@ SALOME_NamingService::ResolveComponent(const char* hostname, if ( !CORBA::is_nil(obj) ) return obj; + else + Change_Directory(basename.c_str()); } }