# HG changeset patch # User William Ehlhardt # Date 1183956337 0 # Node ID b64aa0222a7acad582b0e7c64edd5c7448a3f10b # Parent 7fd9bd55f8d0620a82b82241923055214a66e400 - pool_mkpath now runs purple_escape_filename on its return value diff -r 7fd9bd55f8d0 -r b64aa0222a7a libpurple/certificate.c --- a/libpurple/certificate.c Mon Jul 09 03:47:36 2007 +0000 +++ b/libpurple/certificate.c Mon Jul 09 04:45:37 2007 +0000 @@ -207,7 +207,7 @@ gchar * purple_certificate_pool_mkpath(PurpleCertificatePool *pool, const gchar *id) { - gchar *path; + gchar *path, *path2; g_return_val_if_fail(pool, NULL); g_return_val_if_fail(pool->scheme_name, NULL); @@ -219,7 +219,11 @@ pool->name, id, NULL); - return path; + + path2 = g_strdup(purple_escape_filename(path)); + + g_free(path); + return path2; } gboolean diff -r 7fd9bd55f8d0 -r b64aa0222a7a libpurple/certificate.h --- a/libpurple/certificate.h Mon Jul 09 03:47:36 2007 +0000 +++ b/libpurple/certificate.h Mon Jul 09 04:45:37 2007 +0000 @@ -440,11 +440,11 @@ * Helper function for generating file paths in ~/.purple/certificates for * CertificatePools that use them. * - * @todo Passing in filesystem-unfriendly characters will cause breakage! * @param pool CertificatePool to build a path for * @param id Key to look up a Certificate by. May be NULL. * @return A newly allocated path of the form - * ~/.purple/certificates/scheme_name/pool_name/unique_id + * ~/.purple/certificates/scheme_name/pool_name/unique_id, on which + * purple_escape_filename() has been run. */ gchar * purple_certificate_pool_mkpath(PurpleCertificatePool *pool, const gchar *id);