From 46f8216831769236f8e8ab68322205345638cbca Mon Sep 17 00:00:00 2001 From: TD-Sky Date: Sun, 17 Sep 2023 12:42:54 +0800 Subject: [PATCH] refuse to create symbolic links for cut content --- app/src/executor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/executor.rs b/app/src/executor.rs index a1890d44..bcdc7475 100644 --- a/app/src/executor.rs +++ b/app/src/executor.rs @@ -110,7 +110,12 @@ impl Executor { } "symlink" => { let dest = cx.manager.cwd().to_owned(); - let (_, src) = cx.manager.yanked(); + let (cut, src) = cx.manager.yanked(); + + // Cut doesn't conform to the convention for creating symlinks + if *cut { + return false; + } cx.tasks.file_symlink( src,