diff options
author | Don Scorgie <dscorgie@src.gnome.org> | 2007-08-07 18:37:33 +0000 |
---|---|---|
committer | Don Scorgie <dscorgie@src.gnome.org> | 2007-08-07 18:37:33 +0000 |
commit | 11d7398fb480532f035fc215151b9fff9853f844 (patch) | |
tree | 61226efb7f4f9acd2e53f9907cc6aa73bbdefdff | |
parent | 1653989e7a1f536aefd7a192405d21ffeadb590d (diff) | |
download | yelp-11d7398fb480532f035fc215151b9fff9853f844.tar.gz |
Resolve a full path within a ghelp uri correctly (bug #464295)
* src/yelp-utils.c:
Resolve a full path within a ghelp uri
correctly (bug #464295)
svn path=/trunk/; revision=2874
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/yelp-utils.c | 9 |
2 files changed, 13 insertions, 0 deletions
@@ -1,5 +1,9 @@ 2007-08-07 Don Scorgie <dscorgie@svn.gnome.org> + * src/yelp-utils.c: + Resolve a full path within a ghelp uri + correctly (bug #464295) + * src/yelp-gecko-services.cpp: * src/yelp-debug.c: reduce relocations by removing unnecessarily diff --git a/src/yelp-utils.c b/src/yelp-utils.c index 59a0fad4..3a0436aa 100644 --- a/src/yelp-utils.c +++ b/src/yelp-utils.c @@ -82,6 +82,15 @@ resolve_process_ghelp (char *uri, gchar **result) else if (g_str_equal (mime, "application/xhtml+xml")) type = YELP_RRN_TYPE_XHTML; + } else { + gint file_cut = 6; + /* If a full file path after ghelp:, see if the file + * exists and return type if it does + */ + while (uri[file_cut] == '/' && uri[file_cut+1] == '/') + file_cut++; + type = resolve_full_file (&uri[file_cut]); + *result = g_strdup (&uri[file_cut]); } return type; |