We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddd0b23 commit 5a6d356Copy full SHA for 5a6d356
crates/search/src/incremental_index.rs
@@ -4,7 +4,6 @@ use std::{
4
BTreeSet,
5
},
6
iter::zip,
7
- os::unix::fs::MetadataExt,
8
path::{
9
Path,
10
PathBuf,
@@ -470,7 +469,7 @@ pub async fn build_new_segment<RT: Runtime>(
470
469
471
fn get_size(path: &PathBuf) -> anyhow::Result<u64> {
472
if path.is_file() {
473
- return Ok(path.metadata()?.size());
+ return Ok(path.metadata()?.len());
474
}
475
std::fs::read_dir(path)?.try_fold(0, |acc, curr| Ok(acc + get_size(&curr?.path())?))
476
0 commit comments