im.pidgin.pidgin: 81a2d60e6ab943bb88178215dd69843570bae655
sadrul at pidgin.im
sadrul at pidgin.im
Wed Dec 5 00:00:45 EST 2007
-----------------------------------------------------------------
Revision: 81a2d60e6ab943bb88178215dd69843570bae655
Ancestor: 4e3cab31e53166c95ce21536f6ebb84b904f6b58
Author: sadrul at pidgin.im
Date: 2007-12-05T04:59:43
Branch: im.pidgin.pidgin
Modified files:
libpurple/plugins/autoaccept.c
ChangeLog:
Normalize and escape the filename when auto-accepting a file. References #3982.
-------------- next part --------------
============================================================
--- libpurple/plugins/autoaccept.c 135615827fb471bdc49b7e60edd271c4c2bb5134
+++ libpurple/plugins/autoaccept.c a83d8748f89fba538e4ea5a069bcada4ffecc789
@@ -114,22 +114,23 @@ file_recv_request_cb(PurpleXfer *xfer, g
case FT_ACCEPT:
if (ensure_path_exists(pref))
{
- dirname = g_build_filename(pref, xfer->who, NULL);
+ dirname = g_build_filename(pref, purple_normalize(account, xfer->who), NULL);
if (!ensure_path_exists(dirname))
{
g_free(dirname);
break;
}
-
- filename = g_build_filename(dirname, xfer->filename, NULL);
+ filename = g_build_filename(dirname,
+ purple_escape_filename(xfer->filename), NULL);
+
purple_xfer_request_accepted(xfer, filename);
g_free(dirname);
g_free(filename);
}
-
+
purple_signal_connect(purple_xfers_get_handle(), "file-recv-complete", handle,
PURPLE_CALLBACK(auto_accept_complete_cb), xfer);
break;
More information about the Commits
mailing list