Эх сурвалжийг харах

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

Ashish Kulkarni 11 жил өмнө
parent
commit
1177538b1a
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      scripts/build.py

+ 2 - 0
scripts/build.py

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