Index: path.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/path.cc,v retrieving revision 1.312 diff -u -p -r1.312 path.cc --- path.cc 15 May 2004 15:55:43 -0000 1.312 +++ path.cc 16 May 2004 00:40:18 -0000 @@ -556,13 +556,18 @@ path_conv::check (const char *src, unsig tail--; } /* Remove trailing dots and spaces which are ignored by Win32 functions but - not by native NT functions. */ - while (tail[-1] == '.' || tail[-1] == ' ') - tail--; - if (tail > path_copy + 1 && isslash (tail[-1])) - { - error = ENOENT; - return; + not by native NT functions, except c:. and c:.. */ + if (tail - path_copy > 4 + || !isdrive (path_copy) + || !(path_copy[2] == '.' && (!path_copy[3] || path_copy[3] == '.'))) + { + while (tail[-1] == '.' || tail[-1] == ' ') + tail--; + if (tail > path_copy + 1 && isslash (tail[-1])) + { + error = ENOENT; + return; + } } } path_end = tail;