[gnome-software] trivial: Create the user datadir when saving pending applications
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Create the user datadir when saving pending applications
- Date: Mon, 3 Oct 2016 16:16:10 +0000 (UTC)
commit f86228f1be2c6e049cc3b16fbfa9567a93ffe227
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 3 17:15:55 2016 +0100
trivial: Create the user datadir when saving pending applications
src/gs-plugin-loader.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 814181a..0342ef0 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -3162,6 +3162,11 @@ save_install_queue (GsPluginLoader *plugin_loader)
"gnome-software",
"install-queue",
NULL);
+ if (!gs_mkdir_parent (file, &error)) {
+ g_warning ("failed to create dir for %s: %s",
+ file, error->message);
+ return;
+ }
g_debug ("saving install queue to %s", file);
ret = g_file_set_contents (file, s->str, (gssize) s->len, &error);
if (!ret)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]