mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-22 00:38:06 +08:00
* 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.
This commit is contained in:
parent
59a7603554
commit
b9041ba3d9
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
2003-09-11 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* dir.cc (rmdir): Add more samba workarounds.
|
* dir.cc (rmdir): Add more samba workarounds.
|
||||||
|
@ -203,10 +203,10 @@ normalize_posix_path (const char *src, char *dst)
|
|||||||
|
|
||||||
syscall_printf ("src %s", src);
|
syscall_printf ("src %s", src);
|
||||||
|
|
||||||
if (isdrive (src))
|
if (isdrive (src) || slash_unc_prefix_p (src))
|
||||||
{
|
{
|
||||||
int err = normalize_win32_path (src, dst);
|
int err = normalize_win32_path (src, dst);
|
||||||
if (!err && isdrive (dst))
|
if (!err)
|
||||||
for (char *p = dst; (p = strchr (p, '\\')); p++)
|
for (char *p = dst; (p = strchr (p, '\\')); p++)
|
||||||
*p = '/';
|
*p = '/';
|
||||||
return err;
|
return err;
|
||||||
@ -1315,9 +1315,7 @@ slash_unc_prefix_p (const char *path)
|
|||||||
char *p = NULL;
|
char *p = NULL;
|
||||||
int ret = (isdirsep (path[0])
|
int ret = (isdirsep (path[0])
|
||||||
&& isdirsep (path[1])
|
&& isdirsep (path[1])
|
||||||
&& isalpha (path[2])
|
&& isalnum (path[2])
|
||||||
&& path[3] != 0
|
|
||||||
&& !isdirsep (path[3])
|
|
||||||
&& ((p = strpbrk (path + 3, "\\/")) != NULL));
|
&& ((p = strpbrk (path + 3, "\\/")) != NULL));
|
||||||
if (!ret || p == NULL)
|
if (!ret || p == NULL)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user