libglnx porting: Use glnx_shutil_rm_rf_at()

In some cases (such as `ostree-sysroot-cleanup.c`), the surrounding
code would be substantially cleaner if it was also ported to
fd-relative, but I'm going to do that in a separate patch.

That way these patches are easier to review for mechanical
correctness.  I used an Emacs keyboard macro as the poor man's
[Coccinelle](http://coccinelle.lip6.fr/).
This commit is contained in:
Colin Walters committed 2016-03-23 10:26:01 -04:00
1 parent d456fe5adb
commit 18530894c7
5 files changed
+14 -14

No files matched your search

+2 -2
View File
@@ -473,7 +473,7 @@ merge_etc_changes (GFile *orig_etc,
g_assert (path);
target_file = g_file_resolve_relative_path (new_etc, path);
if (!gs_shutil_rm_rf (target_file, cancellable, error))
if (!glnx_shutil_rm_rf_at (AT_FDCWD, gs_file_get_path_cached (target_file), cancellable, error))
goto out;
}
@@ -1821,7 +1821,7 @@ ostree_sysroot_write_deployments (OstreeSysroot *self,
new_loader_entries_dir = ot_gfile_resolve_path_printf (self->path, "boot/loader.%d/entries",
new_bootversion);
if (!gs_shutil_rm_rf (new_loader_entries_dir, cancellable, error))
if (!glnx_shutil_rm_rf_at (AT_FDCWD, gs_file_get_path_cached (new_loader_entries_dir), cancellable, error))
goto out;
if (!ot_util_ensure_directory_and_fsync (new_loader_entries_dir, cancellable, error))
goto out;