Skip to content

Commit

Permalink
hotfix os independent bytes (#163)
Browse files Browse the repository at this point in the history
* hotfix os independent bytes

* bumped to 0.3.1
  • Loading branch information
mario-eth authored Aug 27, 2024
1 parent f978305 commit 3dee4c6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "MIT"
name = "soldeer"
readme = "./README.md"
repository = "https://github.com/mario-eth/soldeer"
version = "0.3.0"
version = "0.3.1"
rust-version = "1.80"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This project was started to solve the following issues:
- npmjs was built for the js ecosystem not for solidity
- github versioning of the releases is a pain and not all the projects are using it correctly

## Version 0.3.0
## Version 0.3.1

### Version 0.3.0 introduces the following breaking changes

Expand Down
3 changes: 1 addition & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use std::{
env,
fs::{self, File},
io::{BufReader, Read, Write},
os::unix::ffi::OsStrExt as _,
path::{Path, PathBuf},
sync::{
atomic::{AtomicBool, Ordering},
Expand Down Expand Up @@ -212,7 +211,7 @@ pub fn hash_folder(
}
// first hash the filename/dirname to make sure it can't be renamed or removed
let mut hasher = <Sha256 as Digest>::new();
hasher.update(path.as_os_str().as_bytes());
hasher.update(path.to_string_lossy().as_bytes());
// for files, also hash the contents
if let Some(true) = entry.file_type().map(|t| t.is_file()) {
if let Ok(file) = File::open(path) {
Expand Down

0 comments on commit 3dee4c6

Please sign in to comment.