tree-wide: Use helpers for unlinkat()
We have `ot_ensure_unlinked_at()` for the "ignore ENOENT" case, and `glnx_unlinkat()` otherwise. Port all in-tree callers to one or the other as appropriate. Just noticed an unprefixed error in the refs case and decided to do a tree-wide check. Closes: #1142 Approved by: jlebon
This commit is contained in:
1 parent
57509e4d50
commit
303320163f
6 files changed
+16
-36
No files matched your search
@@ -1357,11 +1357,8 @@ static_deltapart_fetch_on_complete (GObject *object,
|
||||
goto out;
|
||||
|
||||
/* From here on, if we fail to apply the delta, we'll re-fetch it */
|
||||
if (unlinkat (_ostree_fetcher_get_dfd (fetcher), temp_path, 0) < 0)
|
||||
{
|
||||
glnx_set_error_from_errno (error);
|
||||
goto out;
|
||||
}
|
||||
if (!glnx_unlinkat (_ostree_fetcher_get_dfd (fetcher), temp_path, 0, error))
|
||||
goto out;
|
||||
|
||||
in = g_unix_input_stream_new (fd, FALSE);
|
||||
|
||||
|
||||
Reference in new issue
Block a user