mirror of https://gitee.com/openkylin/libvirt.git
util: Fix virFileAccessibleAs return path from parent
Despite documentation, if we do fork() parent always returns -1 even if file is accessible. Which is wrong obviously.
This commit is contained in:
parent
419e5fb3e6
commit
b90d4722a5
|
@ -724,8 +724,12 @@ virFileAccessibleAs(const char *path, int mode,
|
|||
return -1;
|
||||
}
|
||||
|
||||
errno = status;
|
||||
return -1;
|
||||
if (status) {
|
||||
errno = status;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* child.
|
||||
|
|
Loading…
Reference in New Issue