* fhandler_disk_file.cc (fhandler_base::fstat_by_name): Check for
file systems incapable of handling FileIdBothDirectoryInformation correctly. (fhandler_disk_file::opendir): Ditto. * path.cc (fs_info::update): Always clear at the start. Rearrange to make certain tests only on non-Samba, non-NFS remote drives. Add test for file systems known to be incapable of handling FileIdBothDirectoryInformation correctly. Right now that's just "UNIXFS". * path.h (struct fs_info): Add has_buggy_fileid_dirinfo flag and accessor methods. (class path_conv): Add has_buggy_fileid_dirinfo method.
This commit is contained in:
@ -390,7 +390,7 @@ fhandler_base::fstat_by_name (struct __stat64 *buf)
|
||||
debug_printf ("%p = NtOpenFile(%S)", status, pc.get_nt_native_path ());
|
||||
goto too_bad;
|
||||
}
|
||||
if (wincap.has_fileid_dirinfo ()
|
||||
if (wincap.has_fileid_dirinfo () && !pc.has_buggy_fileid_dirinfo ()
|
||||
&& NT_SUCCESS (status = NtQueryDirectoryFile (dir, NULL, NULL, 0, &io,
|
||||
&fdi_buf.fdi, sizeof fdi_buf,
|
||||
FileIdBothDirectoryInformation,
|
||||
@ -1574,7 +1574,8 @@ fhandler_disk_file::opendir (int fd)
|
||||
dir->__flags |= dirent_set_d_ino;
|
||||
if (pc.fs_is_nfs ())
|
||||
dir->__flags |= dirent_nfs_d_ino;
|
||||
else if (wincap.has_fileid_dirinfo ())
|
||||
else if (wincap.has_fileid_dirinfo ()
|
||||
&& !pc.has_buggy_fileid_dirinfo ())
|
||||
dir->__flags |= dirent_get_d_ino;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user