diff options
author | Anand Avati <avati@gluster.com> | 2010-09-29 05:41:34 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-29 06:18:13 -0700 |
commit | 87697e7ed88ca650fe70e26d59b67254ed2393f9 (patch) | |
tree | d4be7d666c90ba60e62f8566531873e9e82bd3d2 /xlators | |
parent | 723c57faa30e102732aa29c8c4608703081970f3 (diff) |
pump: skip "." and ".." entries while traversing dir tree
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1235 (Bug for all pump/migrate commits)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/pump.c | 4 |
1 files changed, 4 insertions, 0 deletions
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, |