瀏覽代碼

Merge pull request #92 from vineeth-vk11/#5

Disallow uploading files directly to trash
Nariman Jelveh 1 年之前
父節點
當前提交
8d99e49904
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/helpers.js

+ 5 - 0
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,