mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
66d4cec84d
commit
c4df931b81
1 changed files with 5 additions and 2 deletions
|
|
@ -131,8 +131,11 @@ impl File {
|
|||
Cow::Borrowed(task.from.as_path())
|
||||
};
|
||||
|
||||
let src =
|
||||
if task.relative { path_relative_to(&src, task.to.parent().unwrap()) } else { src };
|
||||
let src = if task.relative {
|
||||
path_relative_to(&src, &fs::canonicalize(task.to.parent().unwrap()).await?)
|
||||
} else {
|
||||
src
|
||||
};
|
||||
|
||||
match fs::remove_file(&task.to).await {
|
||||
Err(e) if e.kind() != NotFound => Err(e)?,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue