On Tue, 2009-08-04 at 06:32 +0000, [email protected] wrote:
> Modified: branches/MarkieB/gtkmain/content/fetchcache.c
> URL: 
> http://source.netsurf-browser.org/branches/MarkieB/gtkmain/content/fetchcache.c?rev=9034&r1=9033&r2=9034&view=diff
> ==============================================================================
> --- branches/MarkieB/gtkmain/content/fetchcache.c (original)
> +++ branches/MarkieB/gtkmain/content/fetchcache.c Tue Aug  4 01:32:27 2009
> @@ -506,6 +506,7 @@
>                                               msg_data);
>                       } else {
>                               content_reset(c);
> +                             printf("fetchcache_callback\n");
>                               fetchcache_error_page(c, data);
>                       }
>                       break;

This change looks spurious. Please revert it.

> Modified: branches/MarkieB/gtkmain/desktop/save_complete.c
> URL: 
> http://source.netsurf-browser.org/branches/MarkieB/gtkmain/desktop/save_complete.c?rev=9034&r1=9033&r2=9034&view=diff
> ==============================================================================
> --- branches/MarkieB/gtkmain/desktop/save_complete.c (original)
> +++ branches/MarkieB/gtkmain/desktop/save_complete.c Tue Aug  4 01:32:27 2009
> @@ -709,22 +721,27 @@
>   * Create the inventory file listing original URLs.
>   */
>  
> -bool save_complete_inventory(const char *path)
> -{
> -     char spath[256];
> +bool save_complete_inventory(const char *path,
> +             struct save_complete_entry *list)
> +{
> +     char urlpath[256];
>       FILE *fp;
> -     char *pathstring;
> -
> -     pathstring = strdup("%s/Inventory");
> -     if (!pathstring) {
> +     char *urlstring, *pathstring;
> +
> +     urlstring = strdup("file://%s/Inventory");
> +     if (urlstring == NULL) {
>               warn_user("NoMemory", 0);
>               return false;
>       }
> -     pathstring[2] = pathsep;        
> -     snprintf(spath, sizeof spath, pathstring, path);
> +     snprintf(urlpath, sizeof urlpath, urlstring, path);
> +     free(urlstring);

This seems overly complex. This is better:

snprintf(urlpath, sizeof urlpath, "file://%s/Inventory", path);

Are you certain that path always begins with a '/'?


J.


Reply via email to