[yelp] * src/yelp-info-parser.c:
- From: Don Scorgie <dscorgie src gnome org>
- To: svn-commits-list gnome org
- Subject: [yelp] * src/yelp-info-parser.c:
- Date: Tue, 28 Apr 2009 14:57:05 -0400 (EDT)
commit afc19355f7f53ded779fe3c6f54ba32a7f58514e
Author: Don Scorgie <dscorgie git gnome org>
Date: Tue Apr 28 19:55:47 2009 +0100
* src/yelp-info-parser.c:
* src/yelp-utils.c:
Fix uncompressed info page accesses
(bug #578350 - patch from parthasarathi susarla)
---
ChangeLog | 7 +++++++
src/yelp-info-parser.c | 8 ++++++--
src/yelp-utils.c | 7 ++++++-
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e4b8ce5..2c48fe8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-04-28 Don Scorgie <dscorgie svn gnome org>
+ * src/yelp-info-parser.c:
+ * src/yelp-utils.c:
+ Fix uncompressed info page accesses
+ (bug #578350 - patch from parthasarathi susarla)
+
+2009-04-28 Don Scorgie <dscorgie svn gnome org>
+
* src/yelp-window.c:
* src/yelp-settings.c:
* src/yelp-bookmarks.c:
diff --git a/src/yelp-info-parser.c b/src/yelp-info-parser.c
index f7731f6..2d06798 100644
--- a/src/yelp-info-parser.c
+++ b/src/yelp-info-parser.c
@@ -137,7 +137,7 @@ find_info_part (gchar *part_name, gchar *base)
*/
gchar *path;
gchar *tmp;
- gchar *bzfname, *gzfname, *lzfd;
+ gchar *bzfname, *gzfname, *lzfd, *fname;
gchar *uri = NULL;
tmp = g_strrstr (base, "/");
path = g_strndup (base, tmp-base);
@@ -145,17 +145,21 @@ find_info_part (gchar *part_name, gchar *base)
bzfname = g_strconcat (path, "/", part_name, ".bz2", NULL);
gzfname = g_strconcat (path, "/", part_name, ".gz", NULL);
lzfd = g_strconcat (path, "/", part_name, ".lzma", NULL);
-
+ fname = g_strconcat (path, "/", part_name, NULL);
+
if (g_file_test (bzfname, G_FILE_TEST_EXISTS))
uri = g_strdup (bzfname);
else if (g_file_test (gzfname, G_FILE_TEST_EXISTS))
uri = g_strdup (gzfname);
else if (g_file_test (lzfd, G_FILE_TEST_EXISTS))
uri = g_strdup (lzfd);
+ else if (g_file_test (fname, G_FILE_TEST_EXISTS))
+ uri = g_strdup (fname);
g_free (bzfname);
g_free (gzfname);
g_free (lzfd);
+ g_free (fname);
g_free (path);
return uri;
diff --git a/src/yelp-utils.c b/src/yelp-utils.c
index 567593f..bea048a 100644
--- a/src/yelp-utils.c
+++ b/src/yelp-utils.c
@@ -197,7 +197,12 @@ resolve_full_file (const gchar *path)
} else if (resolve_is_man_path (path, "lzma")) {
type = YELP_RRN_TYPE_MAN;
}
-
+ } else if (g_str_equal (mime_type, "application/octet-stream")) {
+ if (g_str_has_suffix (path, ".info")) {
+ type = YELP_RRN_TYPE_INFO;
+ } else if (resolve_is_man_path (path, NULL)) {
+ type = YELP_RRN_TYPE_MAN;
+ }
} else if (g_str_equal (mime_type, "text/plain")) {
if (g_str_has_suffix (path, ".info")) {
type = YELP_RRN_TYPE_INFO;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]