mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat: make trash crate optional on Android (#600)
This commit is contained in:
parent
b013dff4fe
commit
e6079438a0
2 changed files with 4 additions and 2 deletions
|
|
@ -24,7 +24,9 @@ parking_lot = "^0"
|
||||||
regex = "^1"
|
regex = "^1"
|
||||||
tokio = { version = "^1", features = [ "parking_lot", "rt-multi-thread" ] }
|
tokio = { version = "^1", features = [ "parking_lot", "rt-multi-thread" ] }
|
||||||
tokio-stream = "^0"
|
tokio-stream = "^0"
|
||||||
trash = "^3"
|
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
tracing = { version = "^0", features = [ "max_level_debug", "release_max_level_warn" ] }
|
tracing = { version = "^0", features = [ "max_level_debug", "release_max_level_warn" ] }
|
||||||
|
|
||||||
|
[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||||
|
trash = "^3"
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ 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(all(not(target_os = "macos"), not(target_os = "android")))]
|
||||||
{
|
{
|
||||||
trash::delete(&task.target)?;
|
trash::delete(&task.target)?;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue