From 9fe98985b32d62cff4bc910323f3a8f22751e89d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 31 Jul 2008 14:41:19 +0000 Subject: [PATCH] * spawn.cc (spawn_guts): Check constructed short pathname for being a DOS device name and fall back to long path name, if so. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/spawn.cc | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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'; } }