]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: fix (part of) wipe_subvol
authorSage Weil <sage.weil@dreamhost.com>
Thu, 3 Feb 2011 23:09:36 +0000 (15:09 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 3 Feb 2011 23:09:36 +0000 (15:09 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/os/FileStore.cc

index f84d8d195e636c684b9e4efb395cb36ad8624a04..e8e8adb75e577f0f20dc6d1cd19f804d11131675 100644 (file)
@@ -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;