From: Sage Weil Date: Thu, 3 Feb 2011 23:09:36 +0000 (-0800) Subject: filestore: fix (part of) wipe_subvol X-Git-Tag: v0.25~231^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9fd1ae4c42b172894b9b4cd3bffd079c418bb9c0;p=ceph.git filestore: fix (part of) wipe_subvol Signed-off-by: Sage Weil --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index f84d8d195e63..e8e8adb75e57 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -595,9 +595,8 @@ int FileStore::wipe_subvol(const char *s) while (::readdir_r(dir, (struct dirent*)buf, &de) == 0) { if (!de) break; - if (strcmp(de->d_name, ".")) - continue; - if (strcmp(de->d_name, "..")) + if (strcmp(de->d_name, ".") == 0 || + strcmp(de->d_name, "..") == 0) continue; ostringstream oss; oss << basedir << "/" << de->d_name;