From 3053f55528dbecb08ddb55fa94546a98af06e3e1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 19 Jan 2018 09:06:39 +0200 Subject: Reimplement prefix_map::find_sup() to iterate over key, not entries --- libbutl/path-map.mxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libbutl/path-map.mxx') diff --git a/libbutl/path-map.mxx b/libbutl/path-map.mxx index 2697a48..95fd54b 100644 --- a/libbutl/path-map.mxx +++ b/libbutl/path-map.mxx @@ -79,6 +79,16 @@ LIBBUTL_MODEXPORT namespace butl root (ks) ? string_type () : ks); } + bool + prefix (key_type& k) const + { + if (k.empty ()) + return false; + + k.make_directory (); + return true; + } + protected: bool prefix (const string_type& p, const string_type& k) const -- cgit v1.1