Skip to content

Commit

Permalink
Fix merge conflict from #4220 (#4242)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored May 18, 2023
1 parent 077328c commit ec7706c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions object_store/src/azure/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,7 @@ impl AzureClient {
path: path.as_ref(),
})?;

match response.headers().get("x-ms-resource-type") {
Some(resource) if resource.as_ref() != b"file" => {
Err(crate::Error::NotFound {
path: path.to_string(),
source: format!(
"Not a file, got x-ms-resource-type: {}",
String::from_utf8_lossy(resource.as_ref())
)
.into(),
})
}
_ => Ok(response),
}
Ok(response)
}

/// Make an Azure Delete request <https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob>
Expand Down Expand Up @@ -304,7 +292,19 @@ impl GetClient for AzureClient {
path: path.as_ref(),
})?;

Ok(response)
match response.headers().get("x-ms-resource-type") {
Some(resource) if resource.as_ref() != b"file" => {
Err(crate::Error::NotFound {
path: path.to_string(),
source: format!(
"Not a file, got x-ms-resource-type: {}",
String::from_utf8_lossy(resource.as_ref())
)
.into(),
})
}
_ => Ok(response),
}
}
}

Expand Down

0 comments on commit ec7706c

Please sign in to comment.