File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -219,24 +219,28 @@ export function createCachedFsUtils(config: ResolvedConfig): FsUtils {
219219 file : string ,
220220 type : 'directory_maybe_symlink' | 'file_maybe_symlink' ,
221221 ) {
222- const direntCache = getDirentCacheFromPath ( path . dirname ( file ) )
222+ const direntCache = getDirentCacheFromPath (
223+ normalizePath ( path . dirname ( file ) ) ,
224+ )
223225 if (
224226 direntCache &&
225227 direntCache . type === 'directory' &&
226228 direntCache . dirents
227229 ) {
228- direntCache . dirents . set ( path . basename ( file ) , { type } )
230+ direntCache . dirents . set ( normalizePath ( path . basename ( file ) ) , { type } )
229231 }
230232 }
231233
232234 function onPathUnlink ( file : string ) {
233- const direntCache = getDirentCacheFromPath ( path . dirname ( file ) )
235+ const direntCache = getDirentCacheFromPath (
236+ normalizePath ( path . dirname ( file ) ) ,
237+ )
234238 if (
235239 direntCache &&
236240 direntCache . type === 'directory' &&
237241 direntCache . dirents
238242 ) {
239- direntCache . dirents . delete ( path . basename ( file ) )
243+ direntCache . dirents . delete ( normalizePath ( path . basename ( file ) ) )
240244 }
241245 }
242246
You can’t perform that action at this time.
0 commit comments