소스 검색

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,