Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: tools/clean_output_directory.py

Issue 1219833003: Fix build directory cleaner, to not follow links on Windows. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clean_output_directory.py
diff --git a/tools/clean_output_directory.py b/tools/clean_output_directory.py
index f94259bb610e0dab8ce21b89494745ac3f2f6cf0..e41671c4d336c24f933407f7bb060983ac22a22a 100755
--- a/tools/clean_output_directory.py
+++ b/tools/clean_output_directory.py
@@ -12,7 +12,13 @@ import utils
def Main():
build_root = utils.GetBuildRoot(utils.GuessOS())
print 'Deleting %s' % build_root
- shutil.rmtree(build_root, ignore_errors=True)
+ if sys.platform != 'win32':
+ shutil.rmtree(build_root, ignore_errors=True)
+ else:
+ # Intentionally ignore return value since a directory might be in use.
+ subprocess.call(['rmdir', '/Q', '/S', build_root],
+ env=os.environ.copy(),
+ shell=True)
return 0
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698