Skip to content

Commit 2fa4728

Browse files
committed
fix windows
1 parent ea3ece4 commit 2fa4728

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ostool/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ostool"
3-
version = "0.7.3"
3+
version = "0.7.4"
44
edition = "2021"
55
description = "A tool for operating system development"
66
authors = ["周睿 <[email protected]>"]
@@ -25,4 +25,4 @@ cargo_metadata = "0.19"
2525
ratatui = "0.29"
2626
crossterm = "0.28"
2727
indicatif = "0.17"
28-
uboot-shell = { version = "0.1", path = "../uboot-shell" }
28+
uboot-shell = { version = "0.1.3", path = "../uboot-shell" }

uboot-shell/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "uboot-shell"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2024"
55
description = "A crate for communicating with u-boot"
66
authors = ["周睿 <[email protected]>"]

uboot-shell/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::{
22
fs::File,
33
io::*,
4-
os::unix::fs::MetadataExt,
54
path::PathBuf,
65
time::{Duration, Instant},
76
};
@@ -190,7 +189,7 @@ impl UbootShell {
190189

191190
let mut file = File::open(&file).unwrap();
192191

193-
let size = file.metadata().unwrap().size() as usize;
192+
let size = file.metadata().unwrap().len() as usize;
194193

195194
p.send(self, &mut file, name, size, |p| {
196195
on_progress(p, size);

0 commit comments

Comments
 (0)