SpartaDOS Construction Set contains a program named "tree.com", which lists recursively all the directories found on a disk and also optionally lists files contained in them in alphabetical order.
This program does not work correctly with SpartaDOS X (and disks accessed by SpartaDOS X). The reason is that it checks the file/dir entry status bits in wrong order, and if the SUBDIR bit is set, it assumes that the entry belongs to a valid directory. Which is correct, the only exception being a deleted directory... Having such an entry encountered, the original tree.com thinks it is a valid directory, tries to enter it, and fails ("error #96", i.e. "150 Path not found").
The reason why it works on earlier SpartaDOS versions is that these aparently clear the SUBDIR bit in a directory being deleted. This is the reason why a directory could only be UNERASEd as a file. SpartaDOS X now preserves this bit (so UNERASE.COM undeletes directories as directories), but there is some side-effect in such tree.coms not working correctly.
The program was buggy anyways, because it also interpreted invalid file entries (files opened but never closed) as valid files. It also seems to require the switch ( "/F" ) to be given in uppercase.
Here is a fixed version, SpartaDOS-X-compatible. It will also work with older SpartaDOS versions, because the only thing done here was to fix the bug. SpartaDOS X-only version (with much enlarged sorting buffer etc.) will be released on Toolkit disk.
Edited by drac030, Mon Jul 18, 2011 4:37 AM.