Open
Conversation
fb1ba6b to
924107e
Compare
Contributor
Author
|
Once again I should rebase this for fewer commits. And it seems to have some problems on windows. |
a2e1d25 to
475e6b8
Compare
475e6b8 to
fb0b35a
Compare
Contributor
Author
|
This works now, but I'm kind of unhappy with it. For example I'm missing a param |
lurch
reviewed
Sep 2, 2022
| with _src_fs.lock(), _dst_fs.lock(): | ||
| with convert_os_errors("move_dir", dst_path, directory=True): | ||
| if _dst_fs.exists(dst_path): | ||
| os.rmdir(dst_syspath) |
Contributor
There was a problem hiding this comment.
Perhaps we don't need / want this os.rmdir?
Looking at the non-optimised "standard copy then delete" code, it looks like perhaps if dst_path already exists, and contains existing contents, then the existing contents will be preserved after the move_dir call? 🤷
Certainly something that it's probably worth adding an extra test for 😉
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of changes
Checklist
Description
shutil.moveto move folders if both filesystems have a syspathfs.move.move_dir