summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-coverage4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-coverage b/git-coverage
index b076886..483e9e7 100755
--- a/git-coverage
+++ b/git-coverage
@@ -347,7 +347,9 @@ class GccCoverage:
matches = []
bad_mtime = False
gcnos = self._gcno_cache.get(source, [])
- mtime = os.path.getmtime(source)
+ mtime = 0
+ if os.path.exists(source):
+ mtime = os.path.getmtime(source)
for gcno in gcnos:
# If the source file has been modified later than the