pyfilesystem2
pyfilesystem2 copied to clipboard
Make all self-move operations raise `IllegalDestination` error
Type of changes
- Bug fix
- New feature
- Tests
Checklist
- [x] I've run the latest black with default args on new code.
- [ ] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
- [x] I've ~~added~~ updated tests for new code.
- [x] 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.