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
There is an issue with ignored folders when WSL paths are accessed from Windows. I suspect the issue lies in the normalizePathToUnix(sp.isAbsolute(path) ? path : sp.join(cwd, path)) function. [Code reference](
// If SLASH_SLASH occurs at the beginning of the path, it is not replaced// because "//StoragePC/DrivePool/Movies" is a valid network pathconsttoUnix=(string: string)=>{letstr=string.replace(BACK_SLASH_RE,SLASH);letprepend=false;if(str.startsWith(SLASH_SLASH)){prepend=true;}while(str.match(DOUBLE_SLASH_RE)){str=str.replace(DOUBLE_SLASH_RE,SLASH);}if(prepend){str=SLASH+str;}returnstr;};
This logic handles some network paths like smb://192.168.1.10/folder (SMB on Linux), but it fails when accessing SMB and WSL paths from Windows, e.g., \\fileserver\sharedfolder and \\wsl.localhost\Ubuntu\home.
The text was updated successfully, but these errors were encountered:
Pragadesh-45
changed the title
Ignored Files and Folders are still watched
Ignored Files and Folders are still watched in WSL
Mar 12, 2025
Describe the bug
There is an issue with ignored folders when WSL paths are accessed from Windows. I suspect the issue lies in the
normalizePathToUnix(sp.isAbsolute(path) ? path : sp.join(cwd, path))
function. [Code reference](chokidar/src/index.ts
Line 189 in 916334c
Versions (please complete the following information):
Additional context
I suspect the issue lies in the
toUnix
function, which is defined for the ignored path. It returns an invalid path when invoked with a valid WSL path.Example:
The current logic is as follows:
https://github.com/paulmillr/chokidar/blob/916334c8a30eb8340f3b6602267ab23a9e31abd0/src/index.ts#L163C1-L178C3
This logic handles some network paths like
smb://192.168.1.10/folder
(SMB on Linux), but it fails when accessing SMB and WSL paths from Windows, e.g.,\\fileserver\sharedfolder
and\\wsl.localhost\Ubuntu\home
.The text was updated successfully, but these errors were encountered: