FileBothDirectoryInformation - not return the full-path

Hi,

I can get info of FileBothDirectoryInformation from FAT successfully on 2K.
But if the file name is larger than 8 characters, sometimes,
FILE_BOTH_DIR_INFORMATION::FileName doesn’t contains the extension.

For example, if there is ‘aaa111111.txt’ on a FAT, I will get ‘aaa111111.’
in FILE_BOTH_DIR_INFORMATION::FileName while
FILE_BOTH_DIR_INFORMATION::FileNameLength is 0x1A - it tells me that there
are *still* another 3 characters in FileName. But, I cannot see those
characters in the memory.
But, sometimes, it works really fine - those 3 characters (‘txt’) are in the
memory.

Has anybody solved this problem?

Regards,
Ray Yang
xxxxx@ybwork.com

Looks like an alignment-problem (has been discussed here some weeks ago, but
there have been a lot of bugs also in the code some people wrote to test for
this bug, so I actually don’t know if there is an alignment-problem in fat).
It could be a problem of you code when handling the buffers.Since the
Explorer queries directories for FileBothDirectoryInformation, I think these
errors must appear there also.

----- Original Message -----
From: “Ray Yang”
To: “File Systems Developers”
Sent: Friday, November 29, 2002 6:00 AM
Subject: [ntfsd] FileBothDirectoryInformation - not return the full-path

> Hi,
>
> I can get info of FileBothDirectoryInformation from FAT successfully on
2K.
> But if the file name is larger than 8 characters, sometimes,
> FILE_BOTH_DIR_INFORMATION::FileName doesn’t contains the extension.
>
> For example, if there is ‘aaa111111.txt’ on a FAT, I will get ‘aaa111111.’
> in FILE_BOTH_DIR_INFORMATION::FileName while
> FILE_BOTH_DIR_INFORMATION::FileNameLength is 0x1A - it tells me that there
> are still another 3 characters in FileName. But, I cannot see those

Yes. If a folder has a long name, this function also has this bug.

Thanks Tobias. I’ll try to search for those posts.

And, is it safe that my driver adds those extension to the buffer?

Regards,
Ray Yang
xxxxx@ybwork.com
----- Original Message -----
From: “Tobias”
To: “File Systems Developers”
Sent: Friday, November 29, 2002 10:37 PM
Subject: [ntfsd] Re: FileBothDirectoryInformation - not return the full-path

> Looks like an alignment-problem (has been discussed here some weeks ago,
but
> there have been a lot of bugs also in the code some people wrote to test
for
> this bug, so I actually don’t know if there is an alignment-problem in
fat).
> It could be a problem of you code when handling the buffers.Since the
> Explorer queries directories for FileBothDirectoryInformation, I think
these
> errors must appear there also.
>
> ----- Original Message -----
> From: “Ray Yang”
> To: “File Systems Developers”
> Sent: Friday, November 29, 2002 6:00 AM
> Subject: [ntfsd] FileBothDirectoryInformation - not return the full-path
>
>
> > Hi,
> >
> > I can get info of FileBothDirectoryInformation from FAT successfully on
> 2K.
> > But if the file name is larger than 8 characters, sometimes,
> > FILE_BOTH_DIR_INFORMATION::FileName doesn’t contains the extension.
> >
> > For example, if there is ‘aaa111111.txt’ on a FAT, I will get
‘aaa111111.’
> > in FILE_BOTH_DIR_INFORMATION::FileName while
> > FILE_BOTH_DIR_INFORMATION::FileNameLength is 0x1A - it tells me that
there
> > are still another 3 characters in FileName. But, I cannot see those
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@ybwork.com
> To unsubscribe send a blank email to %%email.unsub%%
>