mirror of
https://github.com/ivanizag/izapple2.git
synced 2026-10-22 00:02:27 +00:00
Three things from the review. The overlay kept the file open from the first write, so it had an open with no close. It does not any more: read and applyTo open the file and close it, and openForWriting hands the caller a file to close where it writes. applyTo opens once for all the units instead of once per unit, and returns before opening anything when nothing has been saved yet. Identifying the image, which means reading all of it, happened whenever a DSK was loaded, even with no overlay in use, which is the usual case. Now the caller checks for a filename first. openOverlay no longer takes an empty one, both callers check before asking for it. blockDiskOverlay moves to its own file.