diff options
author | Christopher Faylor <me@cgf.cx> | 2003-09-11 17:46:31 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-09-11 17:46:31 +0000 |
commit | b9041ba3d994383ab377e80e3eb4b7f5ba390bb7 (patch) | |
tree | 2962cb354da032215071cf1dd5503693204a782c | |
parent | 59a7603554ea394683ce65bd044cb901ac4857c7 (diff) | |
download | cygnal-b9041ba3d994383ab377e80e3eb4b7f5ba390bb7.tar.gz cygnal-b9041ba3d994383ab377e80e3eb4b7f5ba390bb7.tar.bz2 cygnal-b9041ba3d994383ab377e80e3eb4b7f5ba390bb7.zip |
* path.cc (normalize_posix_path): Put check for '//' prefix back to denote a
UNC path.
(slash_unc_prefix_p): Remove vestige of old //c method for accessing drives.
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 8 |
2 files changed, 10 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 28be890db..42da4a5e6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,12 @@ 2003-09-11 Christopher Faylor <cgf@redhat.com> + * path.cc (normalize_posix_path): Put check for '//' prefix back to + denote a UNC path. + (slash_unc_prefix_p): Remove vestige of old //c method for accessing + drives. + +2003-09-11 Christopher Faylor <cgf@redhat.com> + * dir.cc (rmdir): Add more samba workarounds. 2003-09-11 Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 6412a8a11..b0108777e 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -203,10 +203,10 @@ normalize_posix_path (const char *src, char *dst) syscall_printf ("src %s", src); - if (isdrive (src)) + if (isdrive (src) || slash_unc_prefix_p (src)) { int err = normalize_win32_path (src, dst); - if (!err && isdrive (dst)) + if (!err) for (char *p = dst; (p = strchr (p, '\\')); p++) *p = '/'; return err; @@ -1315,9 +1315,7 @@ slash_unc_prefix_p (const char *path) char *p = NULL; int ret = (isdirsep (path[0]) && isdirsep (path[1]) - && isalpha (path[2]) - && path[3] != 0 - && !isdirsep (path[3]) + && isalnum (path[2]) && ((p = strpbrk (path + 3, "\\/")) != NULL)); if (!ret || p == NULL) return ret; |