Version
latest main branch
Platform
Subsystem
path
What steps will reproduce the bug?
const path = require('node:path');
const pattern = 'cache-platform-regression/**';
console.log(
path.posix.matchesGlob('cache-platform-regression/file', pattern),
);
console.log(
path.win32.matchesGlob('cache-platform-regression\\file', pattern),
);
How often does it reproduce? Is there a required condition?
No
What is the expected behavior? Why is that the expected behavior?
Both calls should return true. The result of path.win32.matchesGlob() should not depend on whether the same pattern was previously used through path.posix.matchesGlob().
What do you see instead?
The Win32 call returns false after the same pattern has first been used through path.posix.
Calling the Win32 version with a previously unused pattern returns the expected result:
console.log(
path.win32.matchesGlob(
'cache-platform-control\\file',
'cache-platform-control/**',
),
);
// true
Additional information
No response
Version
latest main branch
Platform
Subsystem
path
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
No
What is the expected behavior? Why is that the expected behavior?
Both calls should return true. The result of path.win32.matchesGlob() should not depend on whether the same pattern was previously used through path.posix.matchesGlob().
What do you see instead?
The Win32 call returns false after the same pattern has first been used through path.posix.
Calling the Win32 version with a previously unused pattern returns the expected result:
Additional information
No response