From 8ee77e90d305a050c17ab93f218c37113a74e1cc Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Thu, 26 Aug 2021 11:04:13 +0200 Subject: [PATCH] Implementation of SALOME_Fake_NamingService::list_directory_recurs This is needed by ShutdownContainers. --- src/NamingService/SALOME_Fake_NamingService.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.39.2