File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const watchEventSource = require("./watchEventSource");
1212
1313const EXISTANCE_ONLY_TIME_ENTRY = Object . freeze ( { } ) ;
1414
15- let FS_ACCURACY = 1000 ;
15+ let FS_ACCURACY = 2000 ;
1616
1717const IS_OSX = require ( "os" ) . platform ( ) === "darwin" ;
1818const WATCHPACK_POLLING = process . env . WATCHPACK_POLLING ;
@@ -181,7 +181,7 @@ class DirectoryWatcher extends EventEmitter {
181181 safeTime = now ;
182182 accuracy = 0 ;
183183
184- if ( old && old . timestamp === mtime && mtime + FS_ACCURACY < now - 1000 ) {
184+ if ( old && old . timestamp === mtime && mtime + FS_ACCURACY < now ) {
185185 // We are sure that mtime is untouched
186186 // This can be caused by some file attribute change
187187 // e. g. when access time has been changed
@@ -782,4 +782,5 @@ function ensureFsAccuracy(mtime) {
782782 if ( FS_ACCURACY > 1 && mtime % 1 !== 0 ) FS_ACCURACY = 1 ;
783783 else if ( FS_ACCURACY > 10 && mtime % 10 !== 0 ) FS_ACCURACY = 10 ;
784784 else if ( FS_ACCURACY > 100 && mtime % 100 !== 0 ) FS_ACCURACY = 100 ;
785+ else if ( FS_ACCURACY > 1000 && mtime % 1000 !== 0 ) FS_ACCURACY = 1000 ;
785786}
You can’t perform that action at this time.
0 commit comments