提交 4a03db81 编写于 作者: M Matthias Bolte

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.
上级 4a6d4d42
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册