We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a6059b + 25c0881 commit 6d1df56Copy full SHA for 6d1df56
src/uu/cp/src/platform/linux.rs
@@ -251,7 +251,7 @@ where
251
}
252
253
let num_bytes_copied = buf_copy::copy_stream(&mut src_file, &mut dst_file)
254
- .map_err(|_| std::io::Error::from(std::io::ErrorKind::Other))?;
+ .map_err(|e| std::io::Error::other(format!("{e}")))?;
255
256
Ok(num_bytes_copied)
257
tests/by-util/test_cp.rs
@@ -88,6 +88,16 @@ macro_rules! assert_metadata_eq {
88
}};
89
90
91
+#[test]
92
+#[cfg(target_os = "linux")]
93
+fn test_cp_stream_to_full() {
94
+ let (_, mut ucmd) = at_and_ucmd!();
95
+ ucmd.arg("/dev/zero")
96
+ .arg("/dev/full")
97
+ .fails()
98
+ .stderr_contains("No space");
99
+}
100
+
101
#[test]
102
fn test_cp_cp() {
103
let (at, mut ucmd) = at_and_ucmd!();
0 commit comments