Преглед на файлове

Disallow uploading files directly to trash

vineethvk11 преди 1 година
родител
ревизия
b2087f77fc
променени са 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,