pidgin: 34e44fc5: Apparently file/directory names in windo..

sadrul at pidgin.im sadrul at pidgin.im
Thu Jun 3 19:15:47 EDT 2010


-----------------------------------------------------------------
Revision: 34e44fc5b81fa29b233deac42ea221cb1c367101
Ancestor: 507bed04f6c5d4527fe68ad2ee48f01ad9760a24
Author: sadrul at pidgin.im
Date: 2010-06-03T23:08:57
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/34e44fc5b81fa29b233deac42ea221cb1c367101

Modified files:
        libpurple/util.c

ChangeLog: 

Apparently file/directory names in windows cannot end in periods/spaces.

-------------- next part --------------
============================================================
--- libpurple/util.c	fc38e7dbac7fec50b9ca8f1577d7529a16c529fb
+++ libpurple/util.c	7f7d25705b11fab7757bae05ad90b85e4d28b3e1
@@ -4856,6 +4856,13 @@ purple_escape_filename(const char *str)
 			}
 		}
 	}
+#ifdef _WIN32
+	/* File/Directory names in windows cannot end in periods/spaces.
+	 * http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx
+	 */
+	while (j > 0 && (buf[j - 1] == '.' || buf[j - 1] == ' '))
+		j--;
+#endif
 	buf[j] = '\0';
 
 	return buf;


More information about the Commits mailing list