You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure which behavior makes more sense and if this difference is a bug in Node.js, but I think that if !isWin then memfs should also throw ENOTDIR.
The text was updated successfully, but these errors were encountered:
Can you mention what version of Node you're using? As I suspect this might have been something that changed - note too we don't aim to 1:1 match the behaviour of Node especially in regards to error codes due to the potential number of differences across both Node majors and OSs, but this one seems like it should be straightforward to support.
@BadIdeaException do you know if we've got a test to ensure this doesn't regress in the future?
It looks like we might have actually have a test that verifies the opposite error than what we want here? But I'm on mobile so might have missed something 😅
Hmm, you're right. I didn't read closely enough. This is only fixed for creating a file, where openSync.test.ts tests that the correct error is thrown. (NB: mkdirSync.test.ts tests the analogous case when trying to create a directory under a file, at least in recursive mode.)
When trying to read from an illegally nested file, I am still seeing ENOENT, just like OP said.
Using
memfs
:Using the builtin
fs
(on Linux):Using the builtin
fs
(on Windows):I'm not sure which behavior makes more sense and if this difference is a bug in Node.js, but I think that if
!isWin
thenmemfs
should also throwENOTDIR
.The text was updated successfully, but these errors were encountered: