Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Removing directory leads to Stale file handle #123

Closed
DUOLabs333 opened this issue Jan 16, 2024 · 3 comments · Fixed by #124
Closed

Removing directory leads to Stale file handle #123

DUOLabs333 opened this issue Jan 16, 2024 · 3 comments · Fixed by #124

Comments

@DUOLabs333
Copy link
Contributor

Create directory, delete it, then do ls . --- you will get Stale file handle.

@DUOLabs333
Copy link
Contributor Author

DUOLabs333 commented Jan 16, 2024

The issue is here: userHandle.InvalidateHandle(fs, obj.Handle). This invalidates the parent directory, not the file being deleted. You have to get the handle of the file, if it exists. onRename has the same problem.

@willscott
Copy link
Owner

onRename invalidates the specific filename being renamed, so i think there should not be a problem there?

@DUOLabs333
Copy link
Contributor Author

Yes, you're right --- I missed that.

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

Successfully merging a pull request may close this issue.

2 participants