Bläddra i källkod

Disallow uploading files directly to trash

vineethvk11 1 år sedan
förälder
incheckning
b2087f77fc
1 ändrade filer med 5 tillägg och 0 borttagningar
  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 upload_progress_window;
     let opid;
     let opid;
 
 
+    if(dest_path == trash_path){
+        UIAlert('Uploading to trash is not allowed!');
+        return;
+    }
+
     puter.fs.upload(
     puter.fs.upload(
         // what to upload
         // what to upload
         items, 
         items,