mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
fix:#303 returns empty when querying an empty or not dir (#304)
This commit is contained in:
@@ -1690,6 +1690,15 @@ impl DiskAPI for LocalDisk {
|
||||
};
|
||||
out.write_obj(&meta).await?;
|
||||
objs_returned += 1;
|
||||
} else {
|
||||
let fpath =
|
||||
self.get_object_path(&opts.bucket, path_join_buf(&[opts.base_dir.as_str(), STORAGE_FORMAT_FILE]).as_str())?;
|
||||
|
||||
if let Ok(meta) = tokio::fs::metadata(fpath).await
|
||||
&& meta.is_file()
|
||||
{
|
||||
return Err(DiskError::FileNotFound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user