diff --git a/src/libs/clangsupport/filesystem.cpp b/src/libs/clangsupport/filesystem.cpp index 5b8c037f80e..db79ddda312 100644 --- a/src/libs/clangsupport/filesystem.cpp +++ b/src/libs/clangsupport/filesystem.cpp @@ -55,7 +55,10 @@ long long FileSystem::lastModified(FilePathId filePathId) const fileInfo.refresh(); - return fileInfo.lastModified().toMSecsSinceEpoch() / 1000; + if (fileInfo.exists()) + return fileInfo.lastModified().toMSecsSinceEpoch() / 1000; + + return 0; } } // namespace ClangBackEnd