csplit: modify failure in opening file error message

This commit is contained in:
Fuad Ismail
2025-01-09 10:52:19 +01:00
committed by Daniel Hofstetter
parent 96929734ea
commit 694298f0d1
+1 -1
View File
@@ -585,7 +585,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
Ok(csplit(&options, &patterns, stdin.lock())?)
} else {
let file = File::open(file_name)
.map_err_context(|| format!("cannot access {}", file_name.quote()))?;
.map_err_context(|| format!("cannot open {} for reading", file_name.quote()))?;
Ok(csplit(&options, &patterns, BufReader::new(file))?)
}
}