diff options
Diffstat (limited to 'community/gnome-books/504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b.patch')
-rw-r--r-- | community/gnome-books/504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/community/gnome-books/504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b.patch b/community/gnome-books/504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b.patch new file mode 100644 index 0000000000..ea8ecd632e --- /dev/null +++ b/community/gnome-books/504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b.patch @@ -0,0 +1,33 @@ +Upstream: Yes, https://gitlab.gnome.org/GNOME/gnome-books/-/commit/504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b +From 504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Fri, 20 Sep 2019 12:31:35 +0200 +Subject: [PATCH] overview: Handle unset documents xdg-user-dir + +Don't crash if the documents xdg-user-dir is unset on badly installed +systems. + +JS ERROR: Exception in callback for signal: window-mode-changed: Error: Argument 'path' (type filename) may not be null +_addSecondaryLabel@resource:///org/gnome/Books/js/overview.js:308:23 + +Closes: #39 +--- + src/overview.js | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/overview.js b/src/overview.js +index 18a51f1a..a1b0d246 100644 +--- a/src/overview.js ++++ b/src/overview.js +@@ -305,6 +305,8 @@ const EmptyResultsBox = new Lang.Class({ + let docsPath, docsUrl; + + docsPath = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DOCUMENTS); ++ if (!docsPath) ++ docsPath = GLib.get_home_dir(); + docsUrl = Gio.file_new_for_path(docsPath).get_uri(); + useMarkup = true; + /* translators: %s is the location of the Documents folder.*/ +-- +2.24.1 + |