diff --git a/core/src/tasks/workers/file.rs b/core/src/tasks/workers/file.rs index c1f6ef5e..7060b43d 100644 --- a/core/src/tasks/workers/file.rs +++ b/core/src/tasks/workers/file.rs @@ -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)?,