By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Fix watch crash on attachment in a nonexistent directory When an attachment's path points into a directory that does not exist (for example because of a typo), checkAttachment tried to list that parent directory with listDirRel to suggest similar filenames, which threw an uncaught IO exception (getDirectoryContents:openDirStream: does not exist). The watch loop only catches ExitCode, so this crashed the whole watch process. Wrap the directory listing in forgivingAbsence so a nonexistent parent directory simply yields no suggestions, and the normal CE_MISSING_ATTACHMENT error is reported instead. Adds a regression test scenario (CE_MISSING_ATTACHMENT_NONEXISTENT_DIR) that crashed before the fix.
| Time to Start | Worker time | Duration | Time to finish | Idle | |
| Config | 44s | 2s | 2s | 46s | 44s |
| Eval | 1m40s | 7s | 7s | 1m48s | 54s |
| Build | 30m36s | 9s | 10s | 30m46s | 28m48s |
| Suite | 44s | 19s | 30m02s | 30m46s | 30m26s |