fs: indicate that we only copy regular files

This commit is contained in:
Tshepang Lekhonkhobe 2015-08-06 00:25:09 +02:00
parent d019a49ac8
commit ae25b77502

View File

@ -535,7 +535,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
use fs::{File, PathExt, set_permissions};
if !from.is_file() {
return Err(Error::new(ErrorKind::InvalidInput,
"the source path is not an existing file"))
"the source path is not an existing regular file"))
}
let mut reader = try!(File::open(from));