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:
1 parent
d456fe5adb
commit
18530894c7
5 files changed
+14
-14
No files matched your search
@@ -1272,8 +1272,8 @@ rename_pending_loose_objects (OstreeRepo *self,
|
||||
}
|
||||
}
|
||||
|
||||
if (!gs_shutil_rm_rf_at (self->tmp_dir_fd, self->commit_stagedir_name,
|
||||
cancellable, error))
|
||||
if (!glnx_shutil_rm_rf_at (self->tmp_dir_fd, self->commit_stagedir_name,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
ret = TRUE;
|
||||
@@ -1323,7 +1323,7 @@ cleanup_tmpdir (OstreeRepo *self,
|
||||
delta = curtime_secs - mtime;
|
||||
if (delta > 60*60*24)
|
||||
{
|
||||
if (!gs_shutil_rm_rf (path, cancellable, error))
|
||||
if (!glnx_shutil_rm_rf_at (AT_FDCWD, gs_file_get_path_cached (path), cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user