Skip to content

Commit

Permalink
Fix missing module import (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
donatello authored Apr 3, 2024
1 parent de434ed commit 220887f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/s3/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@

//! S3 client to perform bucket and object operations
use std::collections::HashMap;
use std::fs::File;
use std::io::prelude::*;
use std::path::{Path, PathBuf};
use std::sync::Arc;

use crate::s3::args::*;
use crate::s3::creds::Provider;
use crate::s3::error::{Error, ErrorResponse};
Expand All @@ -37,11 +43,8 @@ use dashmap::DashMap;
use hyper::http::Method;
use reqwest::header::HeaderMap;
use reqwest::Body;
use std::collections::HashMap;
use std::fs::File;
use std::io::prelude::*;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use tokio::fs;

use xmltree::Element;

mod get_object;
Expand Down Expand Up @@ -1515,10 +1518,10 @@ impl Client {
unmodified_since: None,
})
.await?;
let path = Path::new(&args.filename);
let path = Path::new(&args.filename);
if let Some(parent_dir) = path.parent() {
if !parent_dir.exists() {
fs::create_dir_all(parent_dir)?;
fs::create_dir_all(parent_dir).await?;
}
}
let mut file = match args.overwrite {
Expand Down

0 comments on commit 220887f

Please sign in to comment.