summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/SConscript2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index 595f8fc8f28..3d5d37ae099 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -488,6 +488,8 @@ def write_git_sha1_h_file(filename):
if not os.path.exists(filename) or not filecmp.cmp(tempfile, filename):
# The filename does not exist or it's different from the new file,
# so replace old file with new.
+ if os.path.exists(filename):
+ os.remove(filename)
os.rename(tempfile, filename)
return