summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-08-15 16:27:09 +0000
committerCorinna Vinschen <corinna@vinschen.de>2007-08-15 16:27:09 +0000
commitc4bd83770022e78e9fbd7f1eefb57ad7c69456cd (patch)
treed170d37c5d61cda5d0fedcc97342fc94287c38c9 /winsup/cygwin/path.cc
parent6d70255fe8fa15d41c3e15e0fdb273da00e16702 (diff)
downloadcygnal-c4bd83770022e78e9fbd7f1eefb57ad7c69456cd.tar.gz
cygnal-c4bd83770022e78e9fbd7f1eefb57ad7c69456cd.tar.bz2
cygnal-c4bd83770022e78e9fbd7f1eefb57ad7c69456cd.zip
* path.cc (get_nt_native_path): Allow to convert special paths which
have no native NT path representation for simplified debug output. * syscalls.cc: Convert debug output to print native NT path. (unlink): Drop redundant debug output.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index b616a101d..9b20322b8 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -544,20 +544,22 @@ path_conv::set_normalized_path (const char *path_copy, bool strip_tail)
PUNICODE_STRING
get_nt_native_path (const char *path, UNICODE_STRING &upath)
{
- if (path[0] != '\\') /* X:\... or NUL, etc. */
+ if (path[0] == '/') /* special path w/o NT path representation. */
+ str2uni_cat (upath, path);
+ else if (path[0] != '\\') /* X:\... or NUL, etc. */
{
str2uni_cat (upath, "\\??\\");
str2uni_cat (upath, path);
}
- else if (path[1] != '\\') /* \Device\... */
+ else if (path[1] != '\\') /* \Device\... */
str2uni_cat (upath, path);
else if ((path[2] != '.' && path[2] != '?')
- || path[3] != '\\') /* \\server\share\... */
+ || path[3] != '\\') /* \\server\share\... */
{
str2uni_cat (upath, "\\??\\UNC\\");
str2uni_cat (upath, path + 2);
}
- else /* \\.\device or \\?\foo */
+ else /* \\.\device or \\?\foo */
{
str2uni_cat (upath, "\\??\\");
str2uni_cat (upath, path + 4);