-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.Category: This is a bug.O-unixOperating system: Unix-likeOperating system: Unix-likeT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
I tried this code:
use std::fs;
fn main() {
match fs::copy("/dev/null", "bar.txt") {
Ok(_n) => (),
Err(e) => {
println!("{}", e);
()
}
}
}
I expected to see this happen:
I agree that the use case isn't super useful. But I would expect this to work and create an empty file.
Instead, this happened:
the source path is not an existing regular file
Don't hesitate to wontfix this bug...
lovasoa, irgendwr, remram44, jeantil, matthiasbeyer and 6 more
Metadata
Metadata
Assignees
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.Category: This is a bug.O-unixOperating system: Unix-likeOperating system: Unix-likeT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.