diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c961944a4..d6b17439d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-07-31 Corinna Vinschen + + * spawn.cc (spawn_guts): Check constructed short pathname for being + a DOS device name and fall back to long path name, if so. + 2008-07-30 Corinna Vinschen * fhandler_disk_file.cc (fhandler_base::fstat_by_name): Check for diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 485d2c44b..f98ab6be9 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -483,7 +483,10 @@ spawn_guts (const char *prog_arg, const char *const *argv, PWCHAR r = runpath + 4; if (r[1] != L':') /* UNC path */ *(r += 2) = L'\\'; - runpath = r; + if (!RtlIsDosDeviceName_U (r)) + runpath = r; + else if (*r == L'\\') + *r = L'C'; } }