summaryrefslogtreecommitdiff
path: root/builder/builder-cache.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-01-17 21:23:03 +0100
committerAlexander Larsson <alexl@redhat.com>2016-01-17 21:23:03 +0100
commitf2853a460b1dd2c4bef0cfe45ef73675581c06f6 (patch)
tree5da1db6d2608d8a59c48c82ec43a214818f22849 /builder/builder-cache.c
parent3848ae54a580b00bc0db144326e3280c73b2e30f (diff)
downloadxdg-app-f2853a460b1dd2c4bef0cfe45ef73675581c06f6.tar.gz
cache: Remove target directory before checking out cache
This will be empty anyway, and if its there the checkout fails.
Diffstat (limited to 'builder/builder-cache.c')
-rw-r--r--builder/builder-cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builder/builder-cache.c b/builder/builder-cache.c
index 877a33a..fb9df71 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