1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

qemu: Fix virFileMakePath error handling in snapshot creation

virFileMakePath returns an errno value on error, that will never
be negative. An virFileMakePath error would have been ignored here,
instead of being reported correctly.
This commit is contained in:
Matthias Bolte 2011-07-04 10:49:54 +02:00
parent 4a6d4d4285
commit 4a03db81cd

View File

@ -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;