fix special-file detection in Windows

svn: r9892
This commit is contained in:
Matthew Flatt 2008-05-19 15:32:31 +00:00
parent 721a846cef
commit b3dc8ca117

View File

@ -1652,16 +1652,16 @@ static int is_special_filename(const char *f, int offset, int len, int not_nul,
} }
if (j && !sf[j]) { if (j && !sf[j]) {
j += delta; j += delta;
if ((j >= (len + delta)) if ((j >= (len + offset))
|| (f[j] == '.') || (f[j] == '.')
|| (f[j] == ':')) || (f[j] == ':'))
return i + 1; return i + 1;
while ((j < len + delta) while ((j < (len + offset))
&& ((f[j] == ' ') && ((f[j] == ' ')
|| (f[j] == '.'))) { || (f[j] == '.'))) {
j++; j++;
} }
if (j >= len + delta) if (j >= (len + offset))
return i + 1; return i + 1;
return 0; return 0;