Bug: Helper function directory_mirror() throws an error if destination directory exists (with overwrite option true) #5478
Labels
bug
Verified issues on the current code behavior or pull requests that will fix them
PHP Version
8.0
CodeIgniter4 Version
4.1.5
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
macOS
Which server did you use?
apache
Database
MySql 5.6
What happened?
Helper function directory_mirror() throws an error if destination directory exists (with overwrite option true), because there is no check whether directory already exists (filesystem_helper.php line 94).
I think this should be changed because the name of the function (* mirror *) suggests a function including subdirectories.
Steps to Reproduce
Just call twice directory_mirror() with same source (including subdirectories) and target path with overwrite option true.
Expected Output
Create sub directory only if subdirectory in target does not exist.
Consequently the name (* mirror *) perhaps suggests that you could mirror an path with all elements (including deleting no longer existing elements in destination)
Anything else?
No response
The text was updated successfully, but these errors were encountered: