Skip to content

Commit

Permalink
feat: support trash for NetBSD (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi authored Oct 9, 2023
1 parent baeb009 commit 5d9b547
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
54 changes: 27 additions & 27 deletions Cargo.lock

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

4 changes: 1 addition & 3 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ syntect = "^5"
tokio = { version = "^1", features = [ "parking_lot", "macros", "rt-multi-thread", "sync", "time", "fs", "process", "io-std", "io-util" ] }
tokio-stream = "^0"
tracing = "^0"
trash = "^3"
unicode-width = "^0"
yazi-prebuild = "^0"

[target.'cfg(target_os = "windows")'.dependencies]
clipboard-win = "^4"

[target.'cfg(not(target_os = "netbsd"))'.dependencies]
trash = "^3"
2 changes: 1 addition & 1 deletion core/src/tasks/workers/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl File {
ctx.set_delete_method(DeleteMethod::NsFileManager);
ctx.delete(&task.target)?;
}
#[cfg(not(target_os = "netbsd"))]
#[cfg(not(target_os = "macos"))]
{
trash::delete(&task.target)?;
}
Expand Down

0 comments on commit 5d9b547

Please sign in to comment.