djh0ffman / PT1210

PT-1210 Amiga DJ Software
44 stars 4 forks source link

Small improvements to the filesystem code #64

Open piru opened 5 months ago

piru commented 5 months ago

Better read_error: show Fault() generated error message on KS 2.0+

Cleaned up to always keep pr_CurrentDir consistent and pointing to a valid dos lock. Before the code would first UnLock() and then CurrentDir() to a new lock. While this kind of works, it might choke things that peek process list and resolve pr_CurrentDir.

Fixed a problem where filenames exactly MAX_FILE_NAME_LENGTH would lead to non-0-terminated strings. Now pt1210_file_gen_file_list also rejects exactly MAX_FILE_NAME_LENGTH char names to stay safe. I didn't increase MAX_FILE_NAME_LENGTH itself to avoid breaking cache compatibility (this is likely what we should do, but that would require bumping version, too).