]> xenbits.xensource.com Git - libvirt.git/commitdiff
Do not skip hidden entries when looking for a stable path
authorJán Tomko <jtomko@redhat.com>
Tue, 21 Jun 2016 15:36:33 +0000 (17:36 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 23 Jun 2016 19:58:38 +0000 (21:58 +0200)
The device names are unlikely to start with a dot.
'.' and '..' are already skipped by virDirRead.

src/storage/storage_backend.c

index 4774f5f104d1dd4f2fe49f7f9d639c383751621b..43f6ecc383d33984997a3c31130d546d93b9168a 100644 (file)
@@ -1940,9 +1940,6 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool,
      */
  retry:
     while ((direrr = virDirRead(dh, &dent, NULL)) > 0) {
-        if (dent->d_name[0] == '.')
-            continue;
-
         if (virAsprintf(&stablepath, "%s/%s",
                         pool->def->target.path,
                         dent->d_name) == -1) {