Repository navigation
atariATR 1.4
Fixes directory handling in the file manager. Copying a directory into an
.atr used to dump its files flat into the root, and deleting a directory that
was not empty failed with "CRC error". Both are fixed, and creating directories
(F7) works as a result.
Polski opis projektu: README.pl.md
What went wrong
When packing, the plugin took only the file name from each entry the file manager
supplied and discarded the relative path that came with it. The documented
behaviour is the opposite: an entry subdir2\filename.ext is meant to be stored
as subdir2\filename.ext. So copying a folder with subfolders produced a heap of
files in the root directory.
It slipped through because the tests covered packing single files and packing into
an existing subdirectory via SubPath, but never a list with paths inside it.
Both cases are permanent tests now — 19 checks across MyDOS and SpartaDOS,
including a sector-accounting check after recursive deletion.
Deleting a directory that is not empty
The file manager reports a directory to delete as DIRNAME\*.* and expects the
plugin to deal with whatever is inside. The plugin went straight for
RemoveDirectory, which — in both MyDOS and SDFS — requires an empty directory,
so the operation raised an error that Total Commander reported as "CRC error".
Deletion is now recursive: files first, then directories from the deepest up.
Protected files are unlocked before removal, so an explicit "delete this folder"
does not stop halfway. Freed sectors are verified to return to their exact
pre-existing count, so nothing is orphaned in the allocation map.
What works now
- The whole tree is reproduced on the image, with every path component converted
to a valid 8.3 name for the target file system:
Moje Gry/Level 1/dane.dat→MOJEGRY/LEVEL1/DANE.DAT. - Missing directories are created along the way, including empty ones — which
is also whyF7(create directory) now works in Total Commander: it arrives as
a directory entry in the pack list. - Name collisions are counted per directory instead of globally, so two files
calleddane.datin different folders no longer get a numeric suffix. - Deleting a directory removes it with everything inside; deleting an empty
directory, a single file, and copying trees in both directions all confirmed
in Total Commander and Double Commander.
Assets
Same set as 1.3: atrtool for Windows x64, macOS (arm64 and Intel) and Linux;
the Total Commander package AtrWcx-1.4.zip; Double Commander plugins for macOS
(arm64, Intel) and Linux; checksums. Still no 32-bit .wcx — build it on Windows
with a 32-bit Free Pascal if you need one.