{"record":{"id":"ec5af2f38308ea01","repo":"uutils/coreutils","slug":"isadirectory","errorCode":"IsADirectory","errorMessage":"Is a directory","messagePattern":"Is a directory","errorType":"console","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"src/uucore/src/lib/features/checksum/validate.rs","lineNumber":570,"sourceCode":"                FileChecksumResult::CantOpen,\n                opts.verbose,\n            );\n        };\n        let print_error = |err: io::Error| {\n            show!(err.map_err_context(|| {\n                locale_aware_escape_name(filename, QuotingStyle::SHELL_ESCAPE)\n                    // This is non destructive thanks to the escaping\n                    .to_string_lossy()\n                    .to_string()\n            }));\n        };\n        match File::open(filename) {\n            Ok(f) => {\n                if f.metadata()\n                    .map_err(|_| LineCheckError::CantOpenFile)?\n                    .is_dir()\n                {\n                    print_error(io::Error::new(\n                        io::ErrorKind::IsADirectory,\n                        \"Is a directory\",\n                    ));\n                    // also regarded as a failed open\n                    failed_open();\n                    Err(LineCheckError::FileIsDirectory)\n                } else {\n                    Ok(Box::new(f))\n                }\n            }\n            Err(err) => {\n                if !opts.ignore_missing {\n                    // yes, we have both stderr and stdout here\n                    print_error(err);\n                    failed_open();\n                }\n                // we could not open the file but we want to continue\n                Err(LineCheckError::FileNotFound)","sourceCodeStart":552,"sourceCodeEnd":588,"githubUrl":"https://github.com/uutils/coreutils/blob/85295bbf788bfd7a6926ba692031563504b304b7/src/uucore/src/lib/features/checksum/validate.rs#L552-L588","documentation":"Error \"Is a directory\" thrown in uutils/coreutils.","triggerScenarios":"Occurs during checksum validation when a path expected to be a file is actually a directory (EISDIR).","commonSituations":"A checksum manifest line pointing at a directory, or passing a directory where a regular file is required.","solutions":["Point the checksum tool at a regular file, not a directory.","Recursively checksum directory contents with find ... -type f instead."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"85295bbf788bfd7a6926ba692031563504b304b7","analyzedAt":"2026-08-19T21:43:27.871Z","contentChangedAt":"2026-08-19T21:43:27.871Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}