Skip to content

Commit

Permalink
fixup! feat(core/services-gdrive): return stat metadata result
Browse files Browse the repository at this point in the history
  • Loading branch information
erickguan committed Nov 20, 2024
1 parent 604916d commit 222ddd5
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions core/src/layers/complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,8 @@ impl<A: Access> CompleteAccessor<A> {
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() {
Expand Down

0 comments on commit 222ddd5

Please sign in to comment.