diff --git a/src/helpers.js b/src/helpers.js index 552382582..78aadcb89 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -1527,6 +1527,8 @@ window.copy_clipboard_items = async function(dest_path, dest_container_element){ progwin = await UIWindowCopyProgress({operation_id: copy_op_id}); }, 2000); + const copied_item_paths = [] + for(let i=0; i{ } else if(last_action.operation === 'upload') { const files = last_action.data; undo_upload(files); + } else if(last_action.operation === 'copy') { + const files = last_action.data; + undo_copy(files); } } } @@ -3490,7 +3516,12 @@ window.undo_create_file_or_folder = async(item)=>{ window.undo_upload = async(files)=>{ for (const file of files) { - console.log(file) await window.delete_item_with_path(file); } } + +window.undo_copy = async(files)=>{ + for (const file of files) { + await window.delete_item_with_path(file); + } +} \ No newline at end of file