Make all self-move operations raise `IllegalDestination` error by althonos · Pull Request #549 · PyFilesystem/pyfilesystem2
Type of changes
- Bug fix
- New feature
- Tests
Checklist
- I've run the latest black with default args on new code.
- I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
- I've
addedupdated tests for new code. - I accept that @PyFilesystem/maintainers may be pedantic in the code review.
Description
As discussed with @lurch in #547, this PR makes all self-move operations raise IllegalDestination instead of being silent. In fs.move.move_file, DestinationExists takes priority if overwrite is False.