[gnome-builder] help: always use file:// URI for local files



commit efb4c7a5d3b73d10d3a05fd1c836afa5eb862de9
Author: Christian Hergert <chergert redhat com>
Date:   Thu Aug 16 11:47:05 2018 -0700

    help: always use file:// URI for local files

 src/libide/application/ide-application-actions.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/application/ide-application-actions.c 
b/src/libide/application/ide-application-actions.c
index 8a2a2eb2e..f415ff71a 100644
--- a/src/libide/application/ide-application-actions.c
+++ b/src/libide/application/ide-application-actions.c
@@ -197,14 +197,16 @@ ide_application_actions_help_cb (GObject      *object,
    */
   if (g_file_test (PACKAGE_DOCDIR"/en/index.html", G_FILE_TEST_IS_REGULAR))
     {
-      const gchar *uri;
-      g_autofree gchar *real_uri = NULL;
+      g_autofree gchar *file_base = NULL;
+      g_autofree gchar *uri = NULL;
       g_autoptr(GError) error = NULL;
 
       if (ide_is_flatpak ())
-        uri = real_uri = ide_flatpak_get_app_path ("/share/doc/gnome-builder/en/index.html");
+        file_base = ide_flatpak_get_app_path ("/share/doc/gnome-builder");
       else
-        uri = "file://"PACKAGE_DOCDIR"/en/index.html";
+        file_base = g_strdup (PACKAGE_DOCDIR);
+
+      uri = g_strdup_printf ("file://%s/en/index.html", file_base);
 
       g_debug ("Documentation URI: %s", uri);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]