Skip to content

Commit

Permalink
feat(services/azblob): use OpStat instead of OpRead in azblob_get_blo…
Browse files Browse the repository at this point in the history
…b_properties
  • Loading branch information
acehinnnqru committed Sep 15, 2023
1 parent 6f4f053 commit 92728f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions core/src/services/azblob/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,7 @@ impl Accessor for AzblobBackend {
return Ok(RpStat::new(Metadata::new(EntryMode::DIR)));
}

let resp = self
.core
.azblob_get_blob_properties(path, &args.to_owned().into())
.await?;
let resp = self.core.azblob_get_blob_properties(path, &args).await?;

let status = resp.status();

Expand Down
4 changes: 2 additions & 2 deletions core/src/services/azblob/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ impl AzblobCore {
pub async fn azblob_get_blob_properties(
&self,
path: &str,
args: &OpRead,
args: &OpStat,
) -> Result<Response<IncomingAsyncBody>> {
let mut req = self.azblob_head_blob_request(path, &args.to_owned().into())?;
let mut req = self.azblob_head_blob_request(path, args)?;

self.sign(&mut req).await?;
self.send(req).await
Expand Down
2 changes: 1 addition & 1 deletion core/src/services/azblob/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl oio::AppendObjectWrite for AzblobWriter {
async fn offset(&self) -> Result<u64> {
let resp = self
.core
.azblob_get_blob_properties(&self.path, &OpRead::default())
.azblob_get_blob_properties(&self.path, &OpStat::default())
.await?;

let status = resp.status();
Expand Down

0 comments on commit 92728f2

Please sign in to comment.