zhechen-cs opened a new pull request, #2201: URL: https://github.com/apache/libcloud/pull/2201
### Description Handle `shutil.SameFileError` before ordinary copy failures in the local storage driver. Downloading an object onto itself still returns `False`, but no longer deletes the source object during failure cleanup. The regression checks both an explicit source filename and its containing directory with a trailing separator, then verifies the stored contents and object metadata remain available. Fixes https://github.com/apache/libcloud/issues/2200 ### Status Ready for review. ### Validation - Local storage and base storage tests: 33 passed, 2 subtests passed (Python 3.12). - Both regression cases fail against unmodified `trunk` with `FileNotFoundError` after the source is deleted. - Black, isort, flake8, pylint and `git diff --check` pass for the changed files. - Live cloud integration tests were not run; this fix only affects the local storage driver. ### Checklist - [x] Code linting - [ ] Documentation (no public API change) - [x] Tests - [ ] ICLA (small bug fix) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
