refuse to create symbolic links for cut content

This commit is contained in:
TD-Sky 2023-09-17 12:42:54 +08:00 committed by sxyazi
parent 4a8cf212f9
commit 46f8216831
No known key found for this signature in database

View file

@ -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,