Index: path.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/path.cc,v retrieving revision 1.326 diff -u -p -r1.326 path.cc --- path.cc 3 Dec 2004 02:00:37 -0000 1.326 +++ path.cc 16 Dec 2004 23:44:24 -0000 @@ -555,6 +555,7 @@ path_conv::check (const char *src, unsig } /* Remove trailing dots and spaces which are ignored by Win32 functions but not by native NT functions. */ + char *tmpTail = tail; while (tail[-1] == '.' || tail[-1] == ' ') tail--; if (tail > path_copy + 1 && isslash (tail[-1])) @@ -562,6 +563,7 @@ path_conv::check (const char *src, unsig error = ENOENT; return; } + tail = tmpTail; } path_end = tail; *tail = '\0'; @@ -1329,6 +1331,7 @@ mount_item::build_win32 (char *dst, cons int n, err = 0; const char *real_native_path; int real_posix_pathlen; + debug_printf ("build_win32 (%s)", src); set_flags (outflags, (unsigned) flags); if (!cygheap->root.exists () || posix_pathlen != 1 || posix_path[0] != '/') { @@ -1353,7 +1356,15 @@ mount_item::build_win32 (char *dst, cons if ((n + strlen (p)) > CYG_MAX_PATH) err = ENAMETOOLONG; else - backslashify (p, dst + n, 0); + { + backslashify (p, dst + n, 0); + char *tail = dst + strlen(dst); + while (tail[-1] == '.' || tail[-1] == ' ') + { + tail[-1] = '\0'; + tail--; + } + } } else { @@ -1375,6 +1386,7 @@ mount_item::build_win32 (char *dst, cons p = s; } } + debug_printf ("src = '%s', dst = '%s'", src, dst); return err; }