Skip to content

Commit

Permalink
Update nix to 0.26.2, bump up fclones to 0.32.1
Browse files Browse the repository at this point in the history
Vulnerabilities found in an old version of nix.
Fixes dependabot alerts.
  • Loading branch information
pkolaczk committed Jun 11, 2023
1 parent 72fc917 commit 3cbe95a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 97 deletions.
95 changes: 6 additions & 89 deletions 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 fclones-gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ edition = "2021"
[dependencies]
byte-unit = "4.0"
chrono = "0.4"
fclones = "0.32"
fclones = { path = "../fclones", version = "0.32.1" }
itertools = "0.10"
adw = { package = "libadwaita", version = "0.2", features = ["v1_1"] }
parse-size = "1"
Expand Down
6 changes: 3 additions & 3 deletions fclones/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fclones"
version = "0.32.0"
version = "0.32.1"
description = "Finds and removes duplicate files"
authors = ["Piotr Kołaczkowski <[email protected]>"]
homepage = "https://github.com/pkolaczk/fclones"
Expand Down Expand Up @@ -73,8 +73,8 @@ fiemap = "0.1"
[target.'cfg(unix)'.dependencies]
file-owner = "0.1"
libc = "0.2"
nix = "0.21"
xattr = "0.2"
nix = "0.26"
xattr = "1"

[target.'cfg(windows)'.dependencies]
winapi = "0.3"
Expand Down
3 changes: 1 addition & 2 deletions fclones/src/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ impl FileLock {
fn nix_as_io_error<T>(result: nix::Result<T>) -> io::Result<T> {
match result {
Ok(x) => Ok(x),
Err(nix::Error::Sys(errno)) => Err(io::Error::from_raw_os_error(errno as i32)),
Err(e) => Err(io::Error::new(io::ErrorKind::Other, e.to_string())),
Err(e) => Err(e.into()),
}
}

Expand Down
5 changes: 3 additions & 2 deletions fclones/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,10 @@ fn create_named_pipe(path: &std::path::Path) -> io::Result<()> {
use nix::sys::stat;
use nix::unistd::mkfifo;
if let Err(e) = mkfifo(path, stat::Mode::S_IRWXU) {
let io_err: io::Error = e.into();
return Err(io::Error::new(
io::Error::from(e.as_errno().unwrap()).kind(),
format!("Failed to create named pipe {}: {}", path.display(), e),
io_err.kind(),
format!("Failed to create named pipe {}: {}", path.display(), io_err),
));
}
Ok(())
Expand Down

0 comments on commit 3cbe95a

Please sign in to comment.