I've decided that the user probably doesn't care if setting the filetype of saved HTML documents to HTML fails or not.

More importantly, this also squashes a memory leak, and stops returning false from a function which is defined as returning -1 on error.

svn path=/trunk/netsurf/; revision=9731
This commit is contained in:
John Mark Bell 2009-12-18 00:11:37 +00:00
parent d7ddeebe76
commit 1f4bb41301
1 changed files with 5 additions and 3 deletions

View File

@ -1042,14 +1042,16 @@ int save_complete_htmlSaveFileFormat(const char *path, const char *filename,
return -1;
}
snprintf(fullpath, len, "%s.%s", path, filename);
ret = htmlSaveFileFormat(fullpath, cur, encoding, format);
error = xosfile_set_type(fullpath, 0xFAF);
if (error) {
LOG(("xosfile_save_stamped: 0x%x: %s",
error->errnum, error->errmess));
warn_user("SaveError", error->errmess);
return false;
error->errnum, error->errmess));
/* Don't warn the user here -- they probably don't care */
}
free(fullpath);
return ret;
}