From: Ovidiu Mircescu Date: Thu, 26 Aug 2021 09:04:13 +0000 (+0200) Subject: Implementation of SALOME_Fake_NamingService::list_directory_recurs X-Git-Tag: V9_8_0a1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8ee77e90d305a050c17ab93f218c37113a74e1cc;p=modules%2Fkernel.git Implementation of SALOME_Fake_NamingService::list_directory_recurs This is needed by ShutdownContainers. --- diff --git a/src/NamingService/SALOME_Fake_NamingService.cxx b/src/NamingService/SALOME_Fake_NamingService.cxx index a667cc03e..2952fef9e 100644 --- a/src/NamingService/SALOME_Fake_NamingService.cxx +++ b/src/NamingService/SALOME_Fake_NamingService.cxx @@ -114,7 +114,6 @@ std::vector SALOME_Fake_NamingService::list_directory() std::lock_guard g(_mutex); std::vector ret; std::vector splitCWD(SplitDir(_current_dir)); - auto len = _current_dir.length(); for(auto it : _map) { std::vector splitIt(SplitDir(it.first)); @@ -130,7 +129,12 @@ std::vector SALOME_Fake_NamingService::list_directory() std::vector SALOME_Fake_NamingService::list_directory_recurs() { - return std::vector(); + std::vector result; + for(const std::pair< std::string,CORBA::Object_var>& it : _map) + if( it.first.length() >= _current_dir.length() && + it.first.compare(0, _current_dir.length(), _current_dir) == 0) + result.push_back(it.first); + return result; } CORBA::Object_ptr SALOME_Fake_NamingService::Resolve(const char* Path)