Explorar o código

fix error on Windows when attempting to remove folders having read-only files

Ashish Kulkarni %!s(int64=11) %!d(string=hai) anos
pai
achega
1177538b1a
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      scripts/build.py

+ 2 - 0
scripts/build.py

@@ -419,6 +419,8 @@ def get_output(*cmd):
 
 
 def rmdir(path):
 def rmdir(path):
     if exists(path):
     if exists(path):
+        if platform.system() == 'Windows':
+            shell('attrib -R %s\* /S' % path)
         shutil.rmtree(path)
         shutil.rmtree(path)
 
 
 def mkdir_p(path):
 def mkdir_p(path):