Am 2016-07-29 um 16:38 schrieb Corinna Vinschen:
On Jul 29 16:18, Corinna Vinschen wrote:
In the first place it would be prudent to find out why the
FileAllInformation info class fails on this drive. And in the second
place it would be important to find out how to fix this. Potential
checks:
- Buffer alignment of the FILE_ALL_INFORMATION member in class
path_conv_handle.
- Buffer size of the FILE_ALL_INFORMATION member. For instance,
does it work if the buffer is 1 byte bigger? Or perhaps if
the buffer is NAME_MAX bigger?
- There's also a chance (albeit minor) that the FileAllInformation call
actually worked and the weird status code is just wrong. After all,
returning from this call with STATUS_BUFFER_OVERFLOW is valid, too,
so I'd check for this as well here.
Hi Corinna,
no, the error code isn't influenced by alignment or size. For local
drives and SMB shares the STATUS_BUFFER_OVERFLOW turns into
STATUS_SUCCESS as soon as there is enough room for the share path in the
FILE_NAME_INFORMATION.FileName flexible array member (actually, why
isn't path_conv_handle.attribs._fai larger? performance?
FileNameInformation usually not needed?). But for the NCP share the
strange error code for FileAllInformation remains. Checking all the
members of FileAllInformation one by one, it turned out that it's the
FileInternalIformation member that fails. I've reported it as a bug to
Novell.
Nevertheless I believe the fallback to
NtQueryDirectoryFile(FileIdBothDirectoryInformation) does not do what
you want if the path is the root directory of a share. But that's not
the cause of this problem.
Franz.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple