NTFS: Sometimes the length of a file in the index (directory) entry is not the correct size

Project:JNode FS
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:active
Description

Caused by: java.io.IOException: Requested 9 clusters but only read 1, file record = org.jnode.fs.ntfs.FileRecord@1b9b03[fileName=$AttrDef]
at org.jnode.fs.ntfs.FileRecord.readData(FileRecord.java:445)
at org.jnode.fs.ntfs.NTFSFile.read(NTFSFile.java:74)

The FileRecord declares it as having real size 464 but NTFSFile.getLength() is using the value from the index which claims that it's 36,000.

Not sure what to do here. If we were to switch to using the actual FileRecord to get the size, it would slow down directory listings for NTFS which isn't particularly good.

Marking as a feature request as it isn't a bug - the bug is in the filesystem itself.