mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
2447917ac7
commit
e8d7716df3
2 changed files with 11 additions and 16 deletions
|
|
@ -26,13 +26,11 @@ syntect = "^5"
|
||||||
tokio = { version = "^1", features = [ "parking_lot", "macros", "rt-multi-thread", "sync", "time", "fs", "process", "io-std", "io-util" ] }
|
tokio = { version = "^1", features = [ "parking_lot", "macros", "rt-multi-thread", "sync", "time", "fs", "process", "io-std", "io-util" ] }
|
||||||
tokio-stream = "^0"
|
tokio-stream = "^0"
|
||||||
tracing = "^0"
|
tracing = "^0"
|
||||||
trash = { version = "^3", optional = true }
|
|
||||||
unicode-width = "^0"
|
unicode-width = "^0"
|
||||||
yazi-prebuild = "^0"
|
yazi-prebuild = "^0"
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
clipboard-win = "^4"
|
clipboard-win = "^4"
|
||||||
|
|
||||||
[features]
|
[target.'cfg(not(target_os = "netbsd"))'.dependencies]
|
||||||
trash_bin = [ "trash" ]
|
trash = "^3"
|
||||||
default = [ "trash_bin" ]
|
|
||||||
|
|
|
||||||
|
|
@ -152,8 +152,6 @@ impl File {
|
||||||
self.sch.send(TaskOp::Adv(task.id, 1, task.length))?
|
self.sch.send(TaskOp::Adv(task.id, 1, task.length))?
|
||||||
}
|
}
|
||||||
FileOp::Trash(task) => {
|
FileOp::Trash(task) => {
|
||||||
#[cfg(feature = "trash_bin")]
|
|
||||||
{
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
use trash::{macos::{DeleteMethod, TrashContextExtMacos}, TrashContext};
|
use trash::{macos::{DeleteMethod, TrashContextExtMacos}, TrashContext};
|
||||||
|
|
@ -161,11 +159,10 @@ impl File {
|
||||||
ctx.set_delete_method(DeleteMethod::NsFileManager);
|
ctx.set_delete_method(DeleteMethod::NsFileManager);
|
||||||
ctx.delete(&task.target)?;
|
ctx.delete(&task.target)?;
|
||||||
}
|
}
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "netbsd"))]
|
||||||
{
|
{
|
||||||
trash::delete(&task.target)?;
|
trash::delete(&task.target)?;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
self.sch.send(TaskOp::Adv(task.id, 1, task.length))?;
|
self.sch.send(TaskOp::Adv(task.id, 1, task.length))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue