When clicking the new CLEAN UP button on macOS, the server returns a 500 error.
This was observed while running the MUIO-Mac port, but the root cause is platform-agnostic.
Traceback (excerpt):
NotADirectoryError: [Errno 20] Not a directory: '.../WebAPP/DataStorage/<Case>/res/.DS_Store'
Cause:
cleanUp() assumes every entry in the res folder is a directory. On macOS, Finder creates .DS_Store files, which causes os.listdir() to fail.
Suggested fix:
Skip non-directory entries before descending into res/<caserun>.
Environment:
- macOS Apple Silicon
- MUIO v5.4