summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-09-14 17:17:36 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-09-14 17:17:36 -0700
commit8dde0ddf51cb5e2369cdd5a465326e50020ef291 (patch)
treebd3abad001fe5423bf84295c7dcdfe9809821675 /src
parent5a4ac0f6fc5fa0a25663f7834fef4cbd5ba98ecd (diff)
downloadvyatta-cfg-8dde0ddf51cb5e2369cdd5a465326e50020ef291.tar.gz
vyatta-cfg-8dde0ddf51cb5e2369cdd5a465326e50020ef291.zip
fix for bug 6195
* fix ".*" filtering.
Diffstat (limited to 'src')
-rw-r--r--src/cstore/unionfs/cstore-unionfs.cpp5
1 files changed, 3 insertions, 2 deletions
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<string>& 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;