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

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,