* path.cc (path_conv::update_fs_info): Don't consider remote drives to be NTFS.
Set root_dir before invoking GetDriveType (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>). Eliminate extra checks for rootdir.
This commit is contained in:
parent
02782489a9
commit
fc633b63a2
|
@ -1,3 +1,9 @@
|
||||||
|
Sun Jun 10 23:34:09 2001 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* path.cc (path_conv::update_fs_info): Don't consider remote drives to
|
||||||
|
be NTFS. Set root_dir before invoking GetDriveType (from Kazuhiro
|
||||||
|
Fujieda <fujieda@jaist.ac.jp>). Eliminate extra checks for rootdir.
|
||||||
|
|
||||||
Sun Jun 10 20:19:47 2001 Christopher Faylor <cgf@cygnus.com>
|
Sun Jun 10 20:19:47 2001 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* path.cc (chdir): Pre-check path for validity before eating trailing
|
* path.cc (chdir): Pre-check path for validity before eating trailing
|
||||||
|
|
|
@ -312,9 +312,7 @@ path_conv::update_fs_info (const char* win32_path)
|
||||||
char tmp_buf [MAX_PATH];
|
char tmp_buf [MAX_PATH];
|
||||||
strncpy (tmp_buf, win32_path, MAX_PATH);
|
strncpy (tmp_buf, win32_path, MAX_PATH);
|
||||||
|
|
||||||
if (!rootdir (tmp_buf) &&
|
if (!rootdir (tmp_buf))
|
||||||
(!GetCurrentDirectory (sizeof (tmp_buf), tmp_buf) <= sizeof (tmp_buf) ||
|
|
||||||
!rootdir (tmp_buf)))
|
|
||||||
{
|
{
|
||||||
debug_printf ("Cannot get root component of path %s", win32_path);
|
debug_printf ("Cannot get root component of path %s", win32_path);
|
||||||
root_dir [0] = fs_name [0] = '\0';
|
root_dir [0] = fs_name [0] = '\0';
|
||||||
|
@ -325,13 +323,13 @@ path_conv::update_fs_info (const char* win32_path)
|
||||||
|
|
||||||
if (strcmp (tmp_buf, root_dir) != 0)
|
if (strcmp (tmp_buf, root_dir) != 0)
|
||||||
{
|
{
|
||||||
|
strncpy (root_dir, tmp_buf, MAX_PATH);
|
||||||
drive_type = GetDriveType (root_dir);
|
drive_type = GetDriveType (root_dir);
|
||||||
if (drive_type == DRIVE_REMOTE || (drive_type == DRIVE_UNKNOWN && (root_dir[0] == '\\' && root_dir[1] == '\\')))
|
if (drive_type == DRIVE_REMOTE || (drive_type == DRIVE_UNKNOWN && (root_dir[0] == '\\' && root_dir[1] == '\\')))
|
||||||
is_remote_drive = 1;
|
is_remote_drive = 1;
|
||||||
else
|
else
|
||||||
is_remote_drive = 0;
|
is_remote_drive = 0;
|
||||||
|
|
||||||
strncpy (root_dir, tmp_buf, MAX_PATH);
|
|
||||||
if (!GetVolumeInformation (root_dir, NULL, 0, &fs_serial, NULL, &fs_flags,
|
if (!GetVolumeInformation (root_dir, NULL, 0, &fs_serial, NULL, &fs_flags,
|
||||||
fs_name, sizeof (fs_name)))
|
fs_name, sizeof (fs_name)))
|
||||||
{
|
{
|
||||||
|
@ -347,7 +345,7 @@ path_conv::update_fs_info (const char* win32_path)
|
||||||
* distinguish between samba and real ntfs, it should be implemented
|
* distinguish between samba and real ntfs, it should be implemented
|
||||||
* here.
|
* here.
|
||||||
*/
|
*/
|
||||||
sym_opt = (strcmp (fs_name, "NTFS") == 0 ? PC_CHECK_EA : 0);
|
sym_opt = (!is_remote_drive && strcmp (fs_name, "NTFS") == 0) ? PC_CHECK_EA : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -502,7 +500,7 @@ path_conv::check (const char *src, unsigned opt,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
int len = sym.check (full_path, suff, opt | sym_opt );
|
int len = sym.check (full_path, suff, opt | sym_opt);
|
||||||
|
|
||||||
if (sym.case_clash)
|
if (sym.case_clash)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue