summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-03-05 18:31:09 +0000
committerCorinna Vinschen <corinna@vinschen.de>2008-03-05 18:31:09 +0000
commit8a889eff57a95b48187e0e7876f2b7898b3e3df7 (patch)
tree9bcf3b3bc3d6c7b70131bf5e15c12005dd5b5ae6 /winsup/cygwin/path.cc
parente3bf57046bfeaf2ce8966aa7b011994e85ee7142 (diff)
downloadcygnal-8a889eff57a95b48187e0e7876f2b7898b3e3df7.tar.gz
cygnal-8a889eff57a95b48187e0e7876f2b7898b3e3df7.tar.bz2
cygnal-8a889eff57a95b48187e0e7876f2b7898b3e3df7.zip
* child_info.h (~child_info_spawn): Check moreinfo->myself_pinfo for
NULL before closing. * spawn.cc (spawn_guts): Don't close moreinfo->myself_pinfo explicitely in case of failing CloseProcess. * fhandler.cc (fhandler_base::open_): Return EISDIR when trying to create a directory. * path.cc (path_conv::check): If input path had a trailing dir separator, tack it on to the native path if directory doesn't exist.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 39293602e..4c4ce2966 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1,4 +1,4 @@
-/* path.cc: path support.
+ /* path.cc: path support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007 Red Hat, Inc.
@@ -1101,6 +1101,8 @@ out:
}
else if (!need_directory || error)
/* nothing to do */;
+ else if (fileattr == INVALID_FILE_ATTRIBUTES)
+ strcat (path, "\\"); /* Reattach trailing dirsep in native path. */
else if (fileattr & FILE_ATTRIBUTE_DIRECTORY)
path_flags &= ~PATH_SYMLINK;
else