Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

fs: after unlink() of locked file, readdir() still shows the file #7176

Closed
bpasero opened this issue Feb 23, 2014 · 2 comments
Closed

fs: after unlink() of locked file, readdir() still shows the file #7176

bpasero opened this issue Feb 23, 2014 · 2 comments

Comments

@bpasero
Copy link

bpasero commented Feb 23, 2014

On Windows, when a file is locked by another process, you can still unlink() this file from another node process and the operation will not fail. The reason has been explained in good detail in #7164.

After unlink() has been called on the locked file, I would expect that a call to readdir() on the parent of that file would not show this file in the list. But the file still shows up although it has been unlinked before. Consistent behavior would be to not list this file.

@trevnorris
Copy link

@bpasero You've opened several of these (#7174, 7175). Would you mind creating a PR with applicable tests of how you'd expect these operations to work?

@jorangreef
Copy link

Thanks @bpasero for opening these. I ran into this today. It's surprising behavior for fs.readdir to show a file that fs.unlink has just deleted.

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

No branches or pull requests

4 participants