Merge pull request #1233 from gyunseo/bugfix/saving-and-opening-wsl2-fs

set the polling mode based on path type to resolve wsl2 file system issue.
This commit is contained in:
Anoop M D 2023-12-18 17:34:59 +05:30 committed by GitHub
commit 46dda28c3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -412,7 +412,7 @@ class Watcher {
setTimeout(() => {
const watcher = chokidar.watch(watchPath, {
ignoreInitial: false,
usePolling: false,
usePolling: watchPath.startsWith("\\\\") ? true : false,
ignored: (path) => ['node_modules', '.git'].some((s) => path.includes(s)),
persistent: true,
ignorePermissionErrors: true,