Use metadata.len() istead of metadata.size() for other platforms
Signed-off-by: hr567 <hr567@hr567.me>
This commit is contained in:
parent
733bef283e
commit
1727bd8e6e
@ -2,7 +2,6 @@ use std::cell::RefCell;
|
|||||||
use std::collections::{BTreeMap, HashMap, VecDeque};
|
use std::collections::{BTreeMap, HashMap, VecDeque};
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::os::unix::prelude::*;
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::rc::{Rc, Weak};
|
use std::rc::{Rc, Weak};
|
||||||
use std::sync::{
|
use std::sync::{
|
||||||
@ -61,7 +60,7 @@ async fn main() -> io::Result<()> {
|
|||||||
let metadata = entry.metadata().await?;
|
let metadata = entry.metadata().await?;
|
||||||
let task = Task {
|
let task = Task {
|
||||||
file: entry.path(),
|
file: entry.path(),
|
||||||
size: metadata.size() as usize,
|
size: metadata.len() as usize,
|
||||||
};
|
};
|
||||||
res.push(task);
|
res.push(task);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user