Again this one is just in theory, but let's add an assertion.
GCancellable *cancellable,
GError **error)
{
- if (unlink (gs_file_get_path_cached (path)) != 0)
+ g_assert (path);
+ const char *pathc = gs_file_get_path_cached (path);
+ g_assert (pathc);
+ if (unlink (pathc) != 0)
{
if (errno != ENOENT)
- return glnx_throw_errno_prefix (error, "unlink(%s)", gs_file_get_path_cached (path));
+ return glnx_throw_errno_prefix (error, "unlink(%s)", pathc);
}
return TRUE;
}