[gnome-software/wip/hughsie/appstream-editor] f-gs_plugin_download_rewrite_resource



commit 9f4eca6d5bc5e03a9340727d70bc8f2ea18f8107
Author: Richard Hughes <richard hughsie com>
Date:   Sat May 6 09:19:56 2017 +0100

    f-gs_plugin_download_rewrite_resource

 lib/gs-plugin.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 41cc4ca..cb6ceff 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1337,6 +1337,12 @@ gs_plugin_download_rewrite_resource_uri (GsPlugin *plugin,
 {
        g_autofree gchar *cachefn = NULL;
 
+       /* local files */
+       if (g_str_has_prefix (uri, "/"))
+               return g_strdup (uri);
+       if (g_str_has_prefix (uri, "file://"))
+               return g_strdup (uri + 7);
+
        /* get cache location */
        cachefn = gs_utils_get_cache_filename ("cssresource", uri,
                                               GS_UTILS_CACHE_FLAG_WRITEABLE |


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