mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-19 22:50:35 +03:00
sysroot: Correct error handling path in previous libglnx port
I happened to have the github page open with my commit after it was merged, and then noticed a bug. We still need to throw if we hit a non-`ENOENT` error. Closes: #315 Approved by: giuseppe
This commit is contained in:
parent
6e57987c7c
commit
7748c361ef
@ -293,7 +293,12 @@ ostree_sysroot_ensure_initialized (OstreeSysroot *self,
|
||||
|
||||
if (fstatat (self->sysroot_fd, "ostree/repo/objects", &stbuf, 0) != 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
if (errno != ENOENT)
|
||||
{
|
||||
glnx_set_prefix_error_from_errno (error, "stat %s", "ostree/repo/objects");
|
||||
goto out;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_autoptr(GFile) repo_dir = g_file_resolve_relative_path (self->path, "ostree/repo");
|
||||
glnx_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
|
||||
|
Loading…
x
Reference in New Issue
Block a user