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

Side by Side 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, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 import shutil 8 import shutil
9 import sys 9 import sys
10 import utils 10 import utils
11 11
12 def Main(): 12 def Main():
13 build_root = utils.GetBuildRoot(utils.GuessOS()) 13 build_root = utils.GetBuildRoot(utils.GuessOS())
14 print 'Deleting %s' % build_root 14 print 'Deleting %s' % build_root
15 shutil.rmtree(build_root, ignore_errors=True) 15 if sys.platform != 'win32':
16 shutil.rmtree(build_root, ignore_errors=True)
17 else:
18 # Intentionally ignore return value since a directory might be in use.
19 subprocess.call(['rmdir', '/Q', '/S', build_root],
20 env=os.environ.copy(),
21 shell=True)
16 return 0 22 return 0
17 23
18 if __name__ == '__main__': 24 if __name__ == '__main__':
19 sys.exit(Main()) 25 sys.exit(Main())
OLDNEW
« 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