From 13b21bdfc597cddb44d38a635506d58104757fd4 Mon Sep 17 00:00:00 2001 From: prascle Date: Thu, 19 Feb 2009 16:12:11 +0000 Subject: [PATCH] PR: bug 20152 --- src/NamingService/SALOME_NamingService.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()); } } -- 2.39.2