# HG changeset patch # User Richard Laager # Date 1130790959 0 # Node ID 525cf7ecd919b8139d3a399a52c5f8d711df8eba # Parent 1b0c83666f98c611440811323b6553a63fbca721 [gaim-migrate @ 14225] SF Patch #1343380 from Richard Gobeille 'This patch should fix a bug preventing files with ".." in the filename from being sent. For example, previously an error would have been thrown when attempting to transfer a file named something like "204-bruce_dickinson-no_way_out...to_be_continued.mp3"' With a change from me... Windows allows both / and \ as path separators, so we need to check for both. committer: Tailor Script diff -r 1b0c83666f98 -r 525cf7ecd919 src/ft.c --- a/src/ft.c Mon Oct 31 20:33:13 2005 +0000 +++ b/src/ft.c Mon Oct 31 20:35:59 2005 +0000 @@ -416,7 +416,11 @@ if (type == GAIM_XFER_SEND) { /* Check the filename. */ - if (g_strrstr(filename, "..")) { +#ifdef _WIN32 + if (g_strrstr(filename, "../") || g_strrstr(filename, "..\\")) { +#else + if (g_strrstr(filename, "../")) { +#endif char *utf8 = g_filename_to_utf8(filename, -1, NULL, NULL, NULL); msg = g_strdup_printf(_("%s is not a valid filename.\n"), utf8);