From 87697e7ed88ca650fe70e26d59b67254ed2393f9 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Wed, 29 Sep 2010 05:41:34 +0000 Subject: pump: skip "." and ".." entries while traversing dir tree Signed-off-by: Anand V. Avati Signed-off-by: Vijay Bellur BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235 --- xlators/cluster/afr/src/pump.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index 87e529bd705..45ae7db0882 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -456,6 +456,10 @@ gf_pump_traverse_directory (loc_t *loc) gf_log (this->name, GF_LOG_DEBUG, "found readdir entry=%s", entry->d_name); + if ((strcmp (entry->d_name, ".") == 0) || + (strcmp (entry->d_name, "..") == 0)) + continue; + file_path = build_file_path (loc, entry); if (!file_path) { gf_log (this->name, GF_LOG_DEBUG, -- cgit