1
0
Эх сурвалжийг харах

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

Disallow uploading files directly to trash
Nariman Jelveh 1 жил өмнө
parent
commit
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,