-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
Describe the bug
When an unreadable input file is specified, the error message returned could be more helpful. The error message is that that the file wasn't found, which is true in the sense that the contents of the parent directory are unreadable, but "file not found" can be distinguished from "some component in the path has permissions that prevents reading the file (if it even exists)".
To Reproduce
- Confirm that a valid DICOM exists but is unreadable due to permissions:
/path/to/an/unreadable/file/DET0001_03.dcm: DICOM medical imaging data
$ ls -l /path/to/an/unreadable/file/DET0001_03.dcm
ls: cannot access /path/to/an/unreadable/file/DET0001_03.dcm: Permission denied
- Run CaPTk, specifying the unreadable file as input:
BreastTexturePipeline -i /path/to/an/unreadable/file/DET0001_03.dcm -o unc_test/ -d 1
Starting pre-processing.
[getFilenameExtension()] Supplied file name '/path/to/an/unreadable/file/DET0001_03.dcm' wasn't found.
**Preferred behavior**
The error message should distinguish various cases, such as:
- File not found (ie., the directory path was valid and readable, but the specified file doesn't exist).
- File not found due to directory permissions (ie., permissions on a directory component prohibit checking if the file exists or not)
- File not readable due to permissions (ie., the permissions on the directory path allow stat(filename), but the content is unreadable due to permissions)
**CaPTk Version**
Linux, 1.9.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels