diff --git a/core/src/layers/complete.rs b/core/src/layers/complete.rs index 91bb68e62ca7..46f9e4ccc0c1 100644 --- a/core/src/layers/complete.rs +++ b/core/src/layers/complete.rs @@ -177,19 +177,8 @@ impl CompleteAccessor { return Ok(RpStat::new(Metadata::new(EntryMode::DIR))); } - if path.ends_with('/') - && (capability.create_dir || // Delegate to the service if the service supports `create_dir` - capability.stat_has_cache_control || // Delegate to the service if the service returns metadata. - capability.stat_has_content_disposition || - capability.stat_has_content_length || - capability.stat_has_content_md5 || - capability.stat_has_content_range || - capability.stat_has_content_type || - capability.stat_has_etag || - capability.stat_has_last_modified || - capability.stat_has_version || - capability.stat_has_user_metadata) - { + // Forward to inner if create_dir is supported. + if path.ends_with('/') && capability.create_dir { let meta = self.inner.stat(path, args).await?.into_metadata(); if meta.is_file() {