Skip to content
Snippets Groups Projects
Commit f4748042 authored by Simon McVittie's avatar Simon McVittie
Browse files

runtime: Create variable directory before trying to GC it


Otherwise, the first time we use a particular runtime, GC will fail with
a user-visible warning.

We're going to create the variable directory moments later anyway, so
this should be no big deal.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 931d8594
No related branches found
No related tags found
1 merge request!273runtime: Create variable directory before trying to GC it
Pipeline #10368 passed
......@@ -670,6 +670,10 @@ pv_runtime_garbage_collect_legacy (const char *variable_dir,
g_return_val_if_fail (runtime_base != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (g_mkdir_with_parents (variable_dir, 0700) != 0)
return glnx_throw_errno_prefix (error, "Unable to create %s",
variable_dir);
if (!glnx_opendirat (AT_FDCWD, variable_dir, TRUE,
&variable_dir_fd, error))
return FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment