summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2018-07-05 09:36:54 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-05 07:38:35 +0000
commitb999a785f2c8496e95b528c3dee901a0ffe32bbd (patch)
treefb7c82c08f7f0079578204184d886038c8c6f4b2
parent1df3f7a5eec6efd847a65bbec629f03c365b07e4 (diff)
downloadflatpak-b999a785f2c8496e95b528c3dee901a0ffe32bbd.tar.gz
flatpak_dir_deploy_appstream: Handle the no-local-commit exists case
For some reason I hit this with a test remote, and it crashes. Make it return an error instead. Closes: #1854 Approved by: alexlarsson
-rw-r--r--common/flatpak-dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
index d6b2ea01..6ccc78c4 100644
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -2170,6 +2170,9 @@ flatpak_dir_deploy_appstream (FlatpakDir *self,
else
do_compress = TRUE;
+ if (new_checksum == NULL)
+ return flatpak_fail (error, "No appstream commit to deploy");
+
real_checkout_dir = g_file_get_child (arch_dir, new_checksum);
checkout_exists = g_file_query_exists (real_checkout_dir, NULL);