forked from qt-creator/qt-creator
Clang: Return zero as time stamp if file does not exists
Change-Id: I738abd4c5c12a1f63dd8ddae7f8bbba468d5855a Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -55,7 +55,10 @@ long long FileSystem::lastModified(FilePathId filePathId) const
|
|||||||
|
|
||||||
fileInfo.refresh();
|
fileInfo.refresh();
|
||||||
|
|
||||||
return fileInfo.lastModified().toMSecsSinceEpoch() / 1000;
|
if (fileInfo.exists())
|
||||||
|
return fileInfo.lastModified().toMSecsSinceEpoch() / 1000;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ClangBackEnd
|
} // namespace ClangBackEnd
|
||||||
|
Reference in New Issue
Block a user