diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/help/help-method.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/components/help/help-method.c b/components/help/help-method.c index 78e813c31..055f0df68 100644 --- a/components/help/help-method.c +++ b/components/help/help-method.c @@ -57,6 +57,7 @@ typedef struct { static gboolean file_in_info_path (const char *file); +static char *old_help_file (const char *old_uri); static HelpURI * @@ -250,7 +251,9 @@ transform_file (const char *old_uri, return help_uri; } g_free (new_uri_with_extension); - + + g_free (new_uri); + new_uri = old_help_file (base); /* Try with an html extension. */ new_uri_with_extension = g_strconcat (new_uri, ".html", NULL); if (convert_file_to_uri (help_uri, new_uri_with_extension)) { @@ -318,6 +321,23 @@ file_from_path (const char *path) } static char * +old_help_file (const char *old_uri) +{ + char *base_name, *new_uri; + + base_name = file_from_path (old_uri); + if (base_name == NULL || base_name[0] == '\0') { + g_free (base_name); + return NULL; + } + + new_uri = gnome_help_file_path (base_name, "index"); + g_free (base_name); + + return new_uri; +} + +static char * find_help_file (const char *old_uri) { char *base_name, *new_uri; |