From f2853a460b1dd2c4bef0cfe45ef73675581c06f6 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Sun, 17 Jan 2016 21:23:03 +0100 Subject: [PATCH] cache: Remove target directory before checking out cache This will be empty anyway, and if its there the checkout fails. --- builder/builder-cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builder/builder-cache.c b/builder/builder-cache.c index 877a33a55..fb9df711f 100644 --- a/builder/builder-cache.c +++ b/builder/builder-cache.c @@ -261,6 +261,9 @@ builder_cache_checkout (BuilderCache *self, const char *commit) if (file_info == NULL) return FALSE; + if (!g_file_delete (self->app_dir, NULL, NULL)) + return FALSE; + /* We check out without user mode, not necessarily because we care about uids not owned by the user (they are all from the build, so should be creatable by the user, but because we want to