From 5b919b62636a1801d4b60b57cb1a3661fb743cbd Mon Sep 17 00:00:00 2001 From: Maksim Kurnikov Date: Thu, 14 Apr 2022 22:12:50 +0300 Subject: [PATCH] create_dir -> create_dir_all to fix dir already exists error in tests --- Cargo.lock | 2 +- dove/tests/helpers.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 40fced04..e522fd23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -805,7 +805,7 @@ dependencies = [ [[package]] name = "dove" -version = "1.6.1" +version = "1.7.0" dependencies = [ "aes 0.7.5", "anyhow", diff --git a/dove/tests/helpers.rs b/dove/tests/helpers.rs index 60ab908a..a6465836 100644 --- a/dove/tests/helpers.rs +++ b/dove/tests/helpers.rs @@ -2,7 +2,7 @@ use std::path::{PathBuf, Path}; use std::fs; -use std::fs::{remove_dir_all, create_dir}; +use std::fs::{remove_dir_all, create_dir, create_dir_all}; use anyhow::{Result, ensure}; use fs_extra::dir::CopyOptions; @@ -127,7 +127,7 @@ fn copy_folder(from: &Path, to: &Path) -> Result<()> { if path.is_file() { fs::copy(&path, &to)?; } else if path.is_dir() { - create_dir(&to)?; + create_dir_all(&to)?; copy_folder(&path, &to)?; } }