virFileMakePath returns an errno value on error, that will never be
negative. So a virFileMakePath error whould have been ignored here.
---
src/qemu/qemu_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 363a361..aab3ab9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7498,7 +7498,7 @@ static int qemuDomainSnapshotWriteMetadata(virDomainObjPtr vm,
goto cleanup;
}
err = virFileMakePath(snapDir);
- if (err < 0) {
+ if (err != 0) {
virReportSystemError(err, _("cannot create snapshot directory
'%s'"),
snapDir);
goto cleanup;
--
1.7.4.1