I decided to do a bit of pruning in DriveSort source code, to remove some old stuff related to the I-Bead (partial analysis of the SETTINGS.DAT file, special icon for that player, ...).
During this cleanup session, I found four bugs:
- A rounding issue in my FAT-12 handling code prevented anyone from reading a disk formated in that filesystem. Hopefully this did not trouble many of you, since FAT-12 is only useful for real small disks (usually less than 8 MB, and never more than 32 MB). So unless you tried to sort an old floppy disk, this shouldn't have affected you.
- When you were trying to open disk which was locked by another process (for example an Explorer window), DriveSort complained about the lock, but unlocked it and dismounted it anyway, which allowed to open it if you tried once again. This is a bit more severe since it may have lead to errors if the locking process was writing at the time DriveSort forcefully removed the lock. This is now fixed, you can test it by repeatedly trying to open a disk which is open in an Explorer window. The message will appear as long as there is a lock.
- When backing up or restoring a disk from DriveSort the disk was not correctly locked. This bug is also quite severe since it might have lead to inconsistent backups, or a corrupted restored disk if another process was writing to the disk while a backup or restore was in progress. I've fixed it so that when you launch a backup or restore on a disk, the task will wait to obtain an exclusive lock on the disk before doing its job. Its displayed status will then contain "Waiting disk lock". When the lock is released, the task will start the backup or restore in the next 15s.
- The playlist mode did not work correctly when using any other sort mode than ascending with the folders after the files. In descending sort, the playlist numbers were still generated in ascending order, which made the files jump from one side of the list to the other. The relative order constraints between folder and file were not built in the playlist mode, which made some files or folders seem stuck in that mode.
I used this opportunity to add a confirmation message when leaving DriveSort while there's still some tasks in progress (for example a backup or restore). The default action was to abort the tasks, which you can still do using the 'Ignore' button.