changeset 30586:626480462902

Apparently file/directory names in windows cannot end in periods/spaces.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 03 Jun 2010 23:08:57 +0000
parents 7f021333e41f
children 52ffd59b26fc
files libpurple/util.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Thu Jun 03 23:08:11 2010 +0000
+++ b/libpurple/util.c	Thu Jun 03 23:08:57 2010 +0000
@@ -4856,6 +4856,13 @@
 			}
 		}
 	}
+#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;