From b2087f77fc4e486f66648be8818c098c87403932 Mon Sep 17 00:00:00 2001 From: vineethvk11 Date: Thu, 14 Mar 2024 02:11:12 +0530 Subject: [PATCH] Disallow uploading files directly to trash --- src/helpers.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers.js b/src/helpers.js index 499b6d82a..9e38f7701 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -2891,6 +2891,11 @@ window.upload_items = async function(items, dest_path){ let upload_progress_window; let opid; + if(dest_path == trash_path){ + UIAlert('Uploading to trash is not allowed!'); + return; + } + puter.fs.upload( // what to upload items,