File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,19 +188,7 @@ impl AzureClient {
188188 path : path. as_ref ( ) ,
189189 } ) ?;
190190
191- match response. headers ( ) . get ( "x-ms-resource-type" ) {
192- Some ( resource) if resource. as_ref ( ) != b"file" => {
193- Err ( crate :: Error :: NotFound {
194- path : path. to_string ( ) ,
195- source : format ! (
196- "Not a file, got x-ms-resource-type: {}" ,
197- String :: from_utf8_lossy( resource. as_ref( ) )
198- )
199- . into ( ) ,
200- } )
201- }
202- _ => Ok ( response) ,
203- }
191+ Ok ( response)
204192 }
205193
206194 /// Make an Azure Delete request <https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob>
@@ -304,7 +292,19 @@ impl GetClient for AzureClient {
304292 path : path. as_ref ( ) ,
305293 } ) ?;
306294
307- Ok ( response)
295+ match response. headers ( ) . get ( "x-ms-resource-type" ) {
296+ Some ( resource) if resource. as_ref ( ) != b"file" => {
297+ Err ( crate :: Error :: NotFound {
298+ path : path. to_string ( ) ,
299+ source : format ! (
300+ "Not a file, got x-ms-resource-type: {}" ,
301+ String :: from_utf8_lossy( resource. as_ref( ) )
302+ )
303+ . into ( ) ,
304+ } )
305+ }
306+ _ => Ok ( response) ,
307+ }
308308 }
309309}
310310
You can’t perform that action at this time.
0 commit comments