Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy fails when src and dest are the same #65

Open
rdeutz opened this issue Apr 29, 2024 · 2 comments
Open

Copy fails when src and dest are the same #65

rdeutz opened this issue Apr 29, 2024 · 2 comments

Comments

@rdeutz
Copy link
Contributor

rdeutz commented Apr 29, 2024

Steps to reproduce the issue

Joomla\Filesystem\File::copy(JPATH_SITE . '/README.txt', JPATH_SITE . '/README.txt');

failed

I know that this doesn't makes sense when we boil it down to the statement here. But the original issue was a result of a script, see joomla/joomla-cms#18352

Expected result

I am not sure if this should fail or not, at least when we just go over it, it will not hurt.

Actual result

Error

System information (as much as possible)

latest version of joomla

Additional comments

@HLeithner
Copy link
Contributor

it's the default behavior as the file system so I think it's correct and should not be simply skipped. Won't change it because the operation didn't finished successful.

@HLeithner
Copy link
Contributor

what we can do is to throw an exception for this case so it can be catched and solved by the executing code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants