diff options
author | bnewbold <bnewbold@robocracy.org> | 2017-12-14 00:31:03 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2022-06-23 10:39:36 -0700 |
commit | acee8af45d71e06babf1e8f65cb25f2076a935a2 (patch) | |
tree | 96d7d38a97532de8383a158fc3e4fd2b0e120ea7 /src | |
parent | 9569572f96a7f9517f8a63eebfacb125ad66e30a (diff) | |
download | geniza-acee8af45d71e06babf1e8f65cb25f2076a935a2.tar.gz geniza-acee8af45d71e06babf1e8f65cb25f2076a935a2.zip |
add buffered read to path import
Diffstat (limited to 'src')
-rw-r--r-- | src/drive.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drive.rs b/src/drive.rs index 01807a2..39b4025 100644 --- a/src/drive.rs +++ b/src/drive.rs @@ -1,5 +1,5 @@ -use std::io::{Read, Write}; +use std::io::{Read, Write, BufReader}; use std::path::{Path, PathBuf}; use std::os::unix::fs::{MetadataExt, OpenOptionsExt}; use std::fs::{File, OpenOptions, read_dir, create_dir_all}; @@ -443,6 +443,7 @@ impl<'a> DatDrive { info!("importing file: '{:?}' as '{:?}'", source.as_ref(), dest.as_ref()); let in_file = File::open(source)?; let in_metadata = in_file.metadata()?; + let in_file = BufReader::new(in_file); let mut stat = Stat::new(); stat.set_mode(in_metadata.mode()); stat.set_uid(in_metadata.uid()); |