Studio-42 / elFinder

📁 Open-source file manager for web, written in JavaScript using jQuery and jQuery UI
https://studio-42.github.io/elFinder/
Other
4.6k stars 1.41k forks source link

try copy / deleting folder if moving it doesn't work #3653

Open terrafrost opened 1 month ago

terrafrost commented 1 month ago

When folders are being copied elFinder creates the destination folder and then iterates through the source folder copying, individually, all the files contained within.

When folders are being moved, however, elFinder just tries to move the destination folder to the source folder and that's that.

Altho some underlying drivers may support that not all do. This PR makes it so that if moving a folder fails it tries to copy the source folder to the destination folder and then it tries to delete the source folder.

This provides a workaround for #3649