Ignore trailing dots on file names.

This commit is contained in:
Andreas Mohr 1999-04-25 12:27:58 +00:00 committed by Alexandre Julliard
parent dda17c681f
commit 0c3f70dbfd
1 changed files with 2 additions and 0 deletions

View File

@ -521,6 +521,8 @@ BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
const char *p = strchr( name, '/' );
int len = p ? (int)(p - name) : strlen(name);
if ((p = strchr( name, '\\' ))) len = MIN( (int)(p - name), len );
/* Ignore trailing dots */
while (len > 1 && name[len-1] == '.') len--;
if (long_len < len + 1) return FALSE;
TRACE(dosfs, "%s,%s\n", path, name );