comparison libpurple/util.c @ 30161: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 a414593d0a78
comparison
equal deleted inserted replaced
30160:7f021333e41f 30161:626480462902
4854 sprintf(buf + j, "%%%02x", utf_char[i] & 0xff); 4854 sprintf(buf + j, "%%%02x", utf_char[i] & 0xff);
4855 j += 3; 4855 j += 3;
4856 } 4856 }
4857 } 4857 }
4858 } 4858 }
4859 #ifdef _WIN32
4860 /* File/Directory names in windows cannot end in periods/spaces.
4861 * http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx
4862 */
4863 while (j > 0 && (buf[j - 1] == '.' || buf[j - 1] == ' '))
4864 j--;
4865 #endif
4859 buf[j] = '\0'; 4866 buf[j] = '\0';
4860 4867
4861 return buf; 4868 return buf;
4862 } 4869 }
4863 4870