Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-04-15 14:00:40 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-04-15 14:00:40 +0400
commit8c3a79bb97bec5b218c8d6d5627698091c408fef (patch)
treedcc4c135f03566dbc53b1610b5a6f8736c702d79 /winsup/utils/cygpath.cc
parentca027229d52d91c8a460b873bd2b454299369fad (diff)
* cygpath.cc (do_pathconv): Only skip \\?\ prefix if it's really
given. Do backslash to slash conversion for mixed paths after handling \\?\ prefix.
Diffstat (limited to 'winsup/utils/cygpath.cc')
-rw-r--r--winsup/utils/cygpath.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 0e60e269e..ade86f7f2 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -744,17 +744,20 @@ do_pathconv (char *filename)
buf = get_short_name (buf);
if (longname_flag)
buf = get_long_name (buf, len);
- if (mixed_flag)
- buf = get_mixed_name (buf);
- len = 4;
- if (strncmp (buf, "\\\\?\\UNC\\", 8) == 0)
- len = 6;
- if (strlen (buf) < MAX_PATH + len)
+ if (strncmp (buf, "\\\\?\\", 4) == 0)
{
- buf += len;
- if (len == 6)
- *buf = '\\';
+ len = 4;
+ if (strncmp (buf + 4, "UNC\\", 4) == 0)
+ len = 6;
+ if (strlen (buf) < MAX_PATH + len)
+ {
+ buf += len;
+ if (len == 6)
+ *buf = '\\';
+ }
}
+ if (mixed_flag)
+ buf = get_mixed_name (buf);
}
}