From: John Stebbins <jstebbins.hb@gmail.com>
Date: Sun, 6 Jan 2019 20:10:30 +0000 (-0800)
Subject: configure: fix LDProbe cleanup on mingw
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b09c99829c9412b05888eb7ac017d9b26166396c;p=handbrake

configure: fix LDProbe cleanup on mingw

LDProbe tries to delete conftest, but should delete conftest.exe on
mingw.  So delete *both* in a try-catch block.
---

diff --git a/make/configure.py b/make/configure.py
index b854ff6fe..1442f850e 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -396,7 +396,11 @@ class LDProbe( Action ):
 
         os.remove( 'conftest.c' )
         if not self.fail:
-            os.remove( 'conftest' )
+            try:
+                os.remove( 'conftest.exe' )
+                os.remove( 'conftest' )
+            except:
+                pass
 
     def _dumpSession( self, printf ):
         printf( '  + %s\n', self.command )