File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2330,7 +2330,6 @@ export class CppProperties {
23302330 return ;
23312331 }
23322332 const compileCommandsFile : string | undefined = this . resolvePath ( compileCommands ) ;
2333- const compileCommandsLastChanged : Date | undefined = this . compileCommandsFileWatcherFallbackTime . get ( compileCommandsFile ) ;
23342333 fs . stat ( compileCommandsFile , ( err , stats ) => {
23352334 if ( err ) {
23362335 if ( err . code === "ENOENT" && this . compileCommandsFile ) {
@@ -2339,10 +2338,13 @@ export class CppProperties {
23392338 this . onCompileCommandsChanged ( compileCommandsFile ) ;
23402339 this . compileCommandsFile = null ; // File deleted
23412340 }
2342- } else if ( compileCommandsLastChanged !== undefined && stats . mtime > compileCommandsLastChanged ) {
2343- this . compileCommandsFileWatcherFallbackTime . set ( compileCommandsFile , new Date ( ) ) ;
2344- this . onCompileCommandsChanged ( compileCommandsFile ) ;
2345- this . compileCommandsFile = vscode . Uri . file ( compileCommandsFile ) ; // File created.
2341+ } else {
2342+ const compileCommandsLastChanged : Date | undefined = this . compileCommandsFileWatcherFallbackTime . get ( compileCommandsFile ) ;
2343+ if ( compileCommandsLastChanged !== undefined && stats . mtime > compileCommandsLastChanged ) {
2344+ this . compileCommandsFileWatcherFallbackTime . set ( compileCommandsFile , new Date ( ) ) ;
2345+ this . onCompileCommandsChanged ( compileCommandsFile ) ;
2346+ this . compileCommandsFile = vscode . Uri . file ( compileCommandsFile ) ; // File created.
2347+ }
23462348 }
23472349 } ) ;
23482350 }
You can’t perform that action at this time.
0 commit comments