diff --git a/src/DICOM.jl b/src/DICOM.jl index cfcc45a..ad592c9 100644 --- a/src/DICOM.jl +++ b/src/DICOM.jl @@ -136,8 +136,12 @@ function find_dicom_files(dir) end function isdicom(file) - bytes = read(file, 132)[end-3:end] - String(bytes) == "DICM" + try + bytes = read(file, 132)[end-3:end] + String(bytes) == "DICM" + catch + not_dicom == true + end end function dcmdir_parse(dir; kwargs...)