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

[bugfix] close handle when remWatch open in getIno #288

Merged
merged 2 commits into from
Jul 31, 2022

Conversation

brokenjacky
Copy link
Contributor

What does this pull request do?

when i remWatch a directory using remWatch, and then delete the directory ,and i find the directory is still in there but i can't access because a handle is still open

Where should the reviewer start?

How should this be manually tested?

see #42 ,the gist by timshannon (https://gist.github.com/timshannon/603f92824c5294269797)

Code0x58
Code0x58 previously approved these changes Apr 11, 2019
Copy link
Contributor

@Code0x58 Code0x58 left a 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. Would this be an excuse for a windows_test.go?

windows.go Outdated Show resolved Hide resolved
Copy link
Contributor

@nathany nathany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

I'm not sure if we can add a test case around this issue. What do you think?

@nathany nathany added the windows label Oct 5, 2019
@mattn
Copy link
Member

mattn commented Jan 15, 2022

@brokenjacky Would you update this?

mattn added a commit that referenced this pull request Jan 16, 2022
mattn added a commit that referenced this pull request Jan 16, 2022
mattn added a commit that referenced this pull request Jan 16, 2022
arp242 pushed a commit to brokenjacky/fsnotify that referenced this pull request Jul 22, 2022
@arp242
Copy link
Member

arp242 commented Jul 22, 2022

I rebased this on the latest main and I added the test case you wrote @mattn; is that test case finished or were you still working on it?

Note: the tests pass even without the syscall.CloseHandle()
@arp242 arp242 merged commit 928895c into fsnotify:main Jul 31, 2022
arp242 added a commit that referenced this pull request Jul 12, 2023
Add test for remWatch, which #288 fixed.

Co-authored-by: jie <jie@tt.com>
Co-authored-by: Nahum Shalman <nahamu@gmail.com>
Co-authored-by: Martin Tournoij <martin@arp242.net>
@shogo82148 shogo82148 mentioned this pull request Mar 6, 2024
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants