* mount.cc (mount_info::from_fstab_line): Always convert drive
letter in native path to uppercase. * path.cc (normalize_win32_path): Ditto. (path_prefix_p): Revert previous patch. * path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER return code to circumvent weird behaviour of Samba 3.2.x shares.
This commit is contained in:
parent
d95d8c5393
commit
54a83cc65a
@ -1,3 +1,13 @@
|
|||||||
|
2009-01-09 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* mount.cc (mount_info::from_fstab_line): Always convert drive
|
||||||
|
letter in native path to uppercase.
|
||||||
|
* path.cc (normalize_win32_path): Ditto.
|
||||||
|
(path_prefix_p): Revert previous patch.
|
||||||
|
|
||||||
|
* path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER
|
||||||
|
return code to circumvent weird behaviour of Samba 3.2.x shares.
|
||||||
|
|
||||||
2009-01-09 Christopher Faylor <me+cygwin@cgf.cx>
|
2009-01-09 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* include/sys/cygwin.h (CW_SETERRNO): Define.
|
* include/sys/cygwin.h (CW_SETERRNO): Define.
|
||||||
|
@ -876,6 +876,9 @@ mount_info::from_fstab_line (char *line, bool user)
|
|||||||
char *cend = find_ws (c);
|
char *cend = find_ws (c);
|
||||||
*cend = '\0';
|
*cend = '\0';
|
||||||
native_path = conv_fstab_spaces (c);
|
native_path = conv_fstab_spaces (c);
|
||||||
|
/* Always convert drive letter to uppercase for case sensitivity. */
|
||||||
|
if (isdrive (native_path))
|
||||||
|
native_path[0] = cyg_toupper (native_path[0]);
|
||||||
/* Second field: POSIX path. */
|
/* Second field: POSIX path. */
|
||||||
c = skip_ws (cend + 1);
|
c = skip_ws (cend + 1);
|
||||||
if (!*c)
|
if (!*c)
|
||||||
|
@ -169,20 +169,8 @@ path_prefix_p (const char *path1, const char *path2, int len1,
|
|||||||
return isdirsep (path2[0]) && !isdirsep (path2[1]);
|
return isdirsep (path2[0]) && !isdirsep (path2[1]);
|
||||||
|
|
||||||
if (isdirsep (path2[len1]) || path2[len1] == 0 || path1[len1 - 1] == ':')
|
if (isdirsep (path2[len1]) || path2[len1] == 0 || path1[len1 - 1] == ':')
|
||||||
{
|
return caseinsensitive ? strncasematch (path1, path2, len1)
|
||||||
if (len1 < 2 || (path1[1] != ':') || (path2[1] != ':'))
|
: !strncmp (path1, path2, len1);
|
||||||
/* nothing */;
|
|
||||||
else if (tolower (*path1) != tolower(*path2))
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
path1 += 2;
|
|
||||||
path2 += 2;
|
|
||||||
len1 -= 2;
|
|
||||||
}
|
|
||||||
return caseinsensitive ? strncasematch (path1, path2, len1)
|
|
||||||
: !strncmp (path1, path2, len1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1177,17 +1165,23 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tail == dst && !isdrive (src) && *src != '/')
|
if (tail == dst)
|
||||||
{
|
{
|
||||||
if (beg_src_slash)
|
if (isdrive (src))
|
||||||
tail += cygheap->cwd.get_drive (dst);
|
/* Always convert drive letter to uppercase for case sensitivity. */
|
||||||
else if (!cygheap->cwd.get (dst, 0))
|
*tail++ = cyg_toupper (*src++);
|
||||||
return get_errno ();
|
else if (*src != '/')
|
||||||
else
|
|
||||||
{
|
{
|
||||||
tail = strchr (tail, '\0');
|
if (beg_src_slash)
|
||||||
if (tail[-1] != '\\')
|
tail += cygheap->cwd.get_drive (dst);
|
||||||
*tail++ = '\\';
|
else if (!cygheap->cwd.get (dst, 0))
|
||||||
|
return get_errno ();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tail = strchr (tail, '\0');
|
||||||
|
if (tail[-1] != '\\')
|
||||||
|
*tail++ = '\\';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2167,7 +2161,10 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt,
|
|||||||
| FILE_OPEN_FOR_BACKUP_INTENT,
|
| FILE_OPEN_FOR_BACKUP_INTENT,
|
||||||
eabuf, easize);
|
eabuf, easize);
|
||||||
/* No right to access EAs or EAs not supported? */
|
/* No right to access EAs or EAs not supported? */
|
||||||
if (status == STATUS_ACCESS_DENIED || status == STATUS_EAS_NOT_SUPPORTED)
|
if (status == STATUS_ACCESS_DENIED || status == STATUS_EAS_NOT_SUPPORTED
|
||||||
|
/* Or a bug in Samba 3.2.x when accessing a share's root dir which
|
||||||
|
has EAs enabled? */
|
||||||
|
|| status == STATUS_INVALID_PARAMETER)
|
||||||
{
|
{
|
||||||
no_ea = true;
|
no_ea = true;
|
||||||
/* If EAs are not supported, there's no sense to check them again
|
/* If EAs are not supported, there's no sense to check them again
|
||||||
|
Loading…
x
Reference in New Issue
Block a user