Cleanup recursive copying.
- Replace dircpy with the more mature and more widely used fs_extra.
This commit is contained in:
parent
f3f013fc9d
commit
272bda3703
22
Cargo.lock
generated
22
Cargo.lock
generated
@ -847,17 +847,6 @@ dependencies = [
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dircpy"
|
||||
version = "0.3.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29259db751c34980bfc44100875890c507f585323453b91936960ab1104272ca"
|
||||
dependencies = [
|
||||
"jwalk",
|
||||
"log",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "directories"
|
||||
version = "5.0.1"
|
||||
@ -2064,16 +2053,6 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jwalk"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2735847566356cd2179a2a38264839308f7079fa96e6bd5a42d740460e003c56"
|
||||
dependencies = [
|
||||
"crossbeam",
|
||||
"rayon",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lalrpop"
|
||||
version = "0.20.2"
|
||||
@ -3584,7 +3563,6 @@ dependencies = [
|
||||
"chrono",
|
||||
"clap",
|
||||
"clap_complete",
|
||||
"dircpy",
|
||||
"dirs",
|
||||
"dot-writer",
|
||||
"fehler",
|
||||
|
@ -76,7 +76,6 @@ cfg-if = "1"
|
||||
terminal_size = ">=0.2.6, <0.4"
|
||||
|
||||
[dev-dependencies]
|
||||
dircpy = "0.3"
|
||||
subplotlib = ">=0.7, <0.10"
|
||||
fehler = "1.0.0"
|
||||
assert_cmd = "2"
|
||||
|
@ -149,7 +149,9 @@ macro_rules! test_examples {
|
||||
|
||||
let tmp_dir = TempDir::new().unwrap();
|
||||
|
||||
dircpy::copy_dir(&fixtures, &tmp_dir)
|
||||
let options = fs_extra::dir::CopyOptions::new()
|
||||
.content_only(true);
|
||||
fs_extra::dir::copy(&fixtures, &tmp_dir, &options)
|
||||
.expect(&format!("Copying {:?} to {:?}",
|
||||
fixtures, &tmp_dir));
|
||||
|
||||
|
@ -1130,10 +1130,7 @@ fn transfer(rsync_bin: &Option<String>, source: &str, destination: &str)
|
||||
|
||||
fn copy(source: &str, destination: &str) -> Result<()> {
|
||||
let options = fs_extra::dir::CopyOptions::new()
|
||||
.overwrite(true)
|
||||
//.content_only(true)
|
||||
//.copy_inside(true)
|
||||
;
|
||||
.overwrite(true);
|
||||
|
||||
std::fs::create_dir_all(destination)?;
|
||||
fs_extra::dir::copy(source, destination, &options)?;
|
||||
|
Loading…
Reference in New Issue
Block a user