[PATCH] qemu: Allow loading snapshot configs starting with a dot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Relax the check for the period on start of a snapshot name to skip only
the '.' and '..' directories.
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 3a54228..637e599 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -520,7 +520,7 @@ qemuDomainSnapshotLoad(void *payload,
     }

     while ((entry = readdir(dir))) {
-        if (entry->d_name[0] == '.')
+        if (STREQ(entry->d_name, ".") || STREQ(entry->d_name, ".."))
             continue;

         /* NB: ignoring errors, so one malformed config doesn't
-- 
1.8.1.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]