diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-06-08 15:11:46 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-06-08 15:12:23 +0200 |
commit | c69a47cfda11edb738f09610ad63b4d5445b1b49 (patch) | |
tree | db3c49c7875d7ca6d27d66c03f656d92693b8f82 /src | |
parent | 43e41b622071d6167d0180b49b61011a1cf14b23 (diff) |
Fix: Do not fail if directory exists
butido should not fail if the source cache directory already exists (which is
the case when downloading two source files for one package).
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Tested-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/source/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/source/mod.rs b/src/source/mod.rs index 7b84c30..080ff32 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -125,7 +125,7 @@ impl SourceEntry { let dir = self.source_file_directory(); if !dir.is_dir() { trace!("Creating directory: {}", dir.display()); - tokio::fs::create_dir(&dir).await.with_context(|| { + tokio::fs::create_dir_all(&dir).await.with_context(|| { anyhow!( "Creating source cache directory for package {} {}: {}", self.package_source_name, |