fatfs icon indicating copy to clipboard operation
fatfs copied to clipboard

Zero-length files shouldn't reserve a cluster

Open natevw opened this issue 11 years ago • 1 comments

Right now due somewhat to the chain architecture, zero-length files always have at least their first cluster allocated. This is somewhat harmless, but is a bit wasteful and does go against the FAT spec which says the first cluster of a zero-length file should be set to "0".

natevw avatar Jun 11 '14 05:06 natevw

I'm not sure this is urgent, but one way to tackle would be to move all the FAT allocations to the chain, and have the higher-level stuff simply read its .firstCluster property when updating the entry for the usual file size/mtime stuff.

natevw avatar Jun 11 '14 05:06 natevw