]> git.sur5r.net Git - u-boot/blobdiff - tools/buildman/builderthread.py
tools: buildman: Don't use the working dir as build dir
[u-boot] / tools / buildman / builderthread.py
index fa9dec043a3b09624350febb24b6e1a1c0e41f02..0efe80d9457b2c4d0ae709fbeed3a60bf3dda76b 100644 (file)
@@ -6,6 +6,7 @@ import errno
 import glob
 import os
 import shutil
+import sys
 import threading
 
 import command
@@ -26,6 +27,9 @@ def Mkdir(dirname, parents = False):
             os.mkdir(dirname)
     except OSError as err:
         if err.errno == errno.EEXIST:
+            if os.path.realpath('.') == os.path.realpath(dirname):
+                print "Cannot create the current working directory '%s'!" % dirname
+                sys.exit(1)
             pass
         else:
             raise