-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Introduce atomic move and write of file #4060
Conversation
cfd6b79
to
90f2259
Compare
@sampsyo any chances to review it? |
Hi, and thanks for your contribution! It's in my queue, but sometimes it can take me a while to have the bandwidth for a full review. Fortunately, the beets community is broad and doesn't just contain me, so other folks might also be able to take a look! You could consider putting out a broader call for reviewers in Discussions, etc., if you think that's warranted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a full review, but some initial thoughts/requests/comments. Let's be certain that this is correct before merging; the fallout might otherwise be huge.
84aff3f
to
1a5ddf8
Compare
@wisp3rwind / @sampsyo ping? |
@sampsyo ping! |
It's not been forgotten! I'll try to have another look soon. |
@wisp3rwind just friendly reminder |
@sampsyo any hope to move forward on it? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🎉 Sorry for the silence here, I've recently had much less time (and motivation) to spend on beets than before.
See the inline comment for a small typo in the log messages. Would you mind adding a changelog entry?
@wisp3rwind I've incorporated your changes and rebased to last master. |
Great! A small style issue (line to long) has crept in in this last change, though. |
The idea of this changes is simple: let move file to some temporary name inside distance folder, and after the file is already copy it renames to expected name. When someone tries to save anything it also moves file to trigger OS level notification for change FS. This commit also enforce that `beets.util.move` shouldn't be used to move directories as it described in comment. Thus, this is fixed beetbox#3849
@wisp3rwind everything is green now! |
Great! I've added a changelog entry for this in 5578d07 |
The idea of this changes is simple: let move file to some temporary name inside distance folder, and after the file is already copy it renames to expected name.
When someone tries to save anything it also moves file to trigger OS level notification for change FS.
This commit also enforce that
beets.util.move
shouldn't be used to move directories as it described in comment.Thus, this is fixed #3849