lib: Port away from gs_file_rename()

In one case, we already had relative fds and hence this was
nicer.  Unfortunately the other areas got uglier.  More fd-relative
porting to do later.

Closes: #424
Approved by: giuseppe
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2016-08-03 08:10:27 +00:00
1 parent 52acb9d8e3
commit c671c1dd3e
2 files changed
+16 -9

No files matched your search

+5 -3
View File
@@ -408,9 +408,11 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
*/
if (!ot_gfile_ensure_unlinked (self->config_path_efi, cancellable, error))
goto out;
if (!gs_file_rename (new_config_path, self->config_path_efi,
cancellable, error))
goto out;
if (rename (gs_file_get_path_cached (new_config_path), gs_file_get_path_cached (self->config_path_efi)) < 0)
{
glnx_set_error_from_errno (error);
goto out;
}
}
ret = TRUE;