Skip to content

Commit

Permalink
feat: write the file name without relative path into sha256sum file
Browse files Browse the repository at this point in the history
  • Loading branch information
KexyBiscuit authored and MingcongBai committed Sep 5, 2024
1 parent 60ecb36 commit 93457d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn sha256sum_file(path: &Path) -> Result<String> {

pub(crate) fn sha256sum_file_tag(path: &Path) -> Result<()> {
let mut f = File::create(format!("{}.sha256sum", path.to_string_lossy()))?;
f.write_all(format!("{} *{}", sha256sum_file(path)?, path.to_string_lossy()).as_bytes())?;
f.write_all(format!("{} *{}", sha256sum_file(path)?, path.file_name().to_string_lossy()).as_bytes())?;

Check failure on line 26 in src/network.rs

View workflow job for this annotation

GitHub Actions / build

no method named `to_string_lossy` found for enum `std::option::Option` in the current scope

Ok(())
}
Expand Down

0 comments on commit 93457d2

Please sign in to comment.