z80andrew / SerialDisk

A virtual Atari ST disk over serial for Windows, Linux and macOS
GNU General Public License v3.0
21 stars 2 forks source link

Empty files are not written to PC #25

Closed z80andrew closed 3 years ago

z80andrew commented 3 years ago

Copying an empty file from Atari to PC transfers correctly, but does not write the file to disk.

I think this is a problem with the following line in Disk.SyncLocalDisk: if (String.IsNullOrEmpty(LocalDirectoryContentName) && directoryBuffer[directoryEntryIndex] != 0xe5 && startClusterIndex != 0)

Empty files have a start cluster of 0, and so are not considered ready for writing to disk.

z80andrew commented 3 years ago

All files are now created when the FAT16 directory entry is written. If additional data is sent for the file, this is written afterwards.