cache: Don't fail to create cache if parent dir is not created

tingping/wmclass
Alexander Larsson 2016-01-18 17:17:04 +01:00
parent 87ad85116e
commit 496cbac3db
1 changed files with 5 additions and 0 deletions

View File

@ -213,6 +213,11 @@ builder_cache_open (BuilderCache *self,
if (!g_file_query_exists (self->cache_dir, NULL))
{
g_autoptr(GFile) parent = g_file_get_parent (self->cache_dir);
if (!gs_file_ensure_directory (parent, TRUE, NULL, error))
return FALSE;
if (!ostree_repo_create (self->repo, OSTREE_REPO_MODE_BARE_USER, NULL, error))
return FALSE;
}