Browse Source

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

Disallow uploading files directly to trash
Nariman Jelveh 1 năm trước cách đây
mục cha
commit
8d99e49904
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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,