From 8dde0ddf51cb5e2369cdd5a465326e50020ef291 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 14 Sep 2010 17:17:36 -0700 Subject: fix for bug 6195 * fix ".*" filtering. --- src/cstore/unionfs/cstore-unionfs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cstore/unionfs/cstore-unionfs.cpp') diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp index eebabfe..f125f37 100644 --- a/src/cstore/unionfs/cstore-unionfs.cpp +++ b/src/cstore/unionfs/cstore-unionfs.cpp @@ -997,11 +997,12 @@ UnionfsCstore::get_all_child_dir_names(b_fs::path root, vector& nodes) continue; } // name cannot start with "." - if (di->path().file_string().substr(0, 1) == ".") { + string cname = di->path().filename(); + if (cname.length() < 1 || cname[0] == '.') { continue; } // found one - nodes.push_back(_unescape_path_name(di->path().filename())); + nodes.push_back(_unescape_path_name(cname)); } } catch (...) { return; -- cgit v1.2.3