Skip to content
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

Delay file removal to fix vim backupcopy issue #55

Closed
wants to merge 1 commit into from

Conversation

es128
Copy link
Contributor

@es128 es128 commented Oct 1, 2013

I wasn't able to reproduce the issue actually using vim, but I was able to do so using the mv file.js file.js.swp && sleep .1 && mv file.js.swp file.js emulation method. This patch does appear to cause the desired behavior of handling the event as a change instead of an unlink with no subsequent add.

Aside from a very slight delay in unlink events, I am not sure whether this will lead to unwanted side-effects. It would be great if people could try it out with various use-cases to see how it goes - particularly those who can consistently make it happen with vim.

@paulmillr
Copy link
Owner

need someone with vim to test this out because it can bring unwanted bugs

@andrewrk
Copy link

andrewrk commented Oct 1, 2013

this code looks suspicious. what exactly are you trying to do?

@es128
Copy link
Contributor Author

es128 commented Oct 2, 2013

Haha, suspicious? It's pretty straightforward, albeit a bit hacky. Take a look at #35 if you haven't already to understand the problem this is trying to solve. In that thread, I mentioned an idea a while ago about a possible solution. I tried it out today and it seemed to work, hence the PR.

That said, it isn't something I am affected by personally, and I couldn't even recreate the reported issue using vim. But this keeps coming up with brunch users, so that was my motivation to attempt a fix.

I agree with @paulmillr that we need some users who were affected by and able to recreate the vim issue to try this out and provide feedback before this is considered for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants