# HG changeset patch # User Bernhard Urban # Date 1399642216 -7200 # Node ID c3869fe3d91762a25fbcd9b4abc64316f7b09d89 # Parent 24aa5dbcf92d46e8354c88d421198547840a00af mx clean: make it more reliable on windows diff -r 24aa5dbcf92d -r c3869fe3d917 mxtool/mx.py --- a/mxtool/mx.py Fri May 09 14:24:02 2014 +0200 +++ b/mxtool/mx.py Fri May 09 15:30:16 2014 +0200 @@ -2719,6 +2719,12 @@ args = parser.parse_args(args) + def _rmtree(dirPath): + path = dirPath + if get_os() == 'windows': + path = unicode("\\\\?\\" + dirPath) + shutil.rmtree(path) + for p in projects_opt_limit_to_suites(): if p.native: if args.native: @@ -2729,13 +2735,13 @@ if genDir != '' and exists(genDir): log('Clearing {0}...'.format(genDir)) for f in os.listdir(genDir): - shutil.rmtree(join(genDir, f)) + _rmtree(join(genDir, f)) outputDir = p.output_dir() if outputDir != '' and exists(outputDir): log('Removing {0}...'.format(outputDir)) - shutil.rmtree(outputDir) + _rmtree(outputDir) for configName in ['netbeans-config.zip', 'eclipse-config.zip']: config = TimeStampFile(join(p.suite.mxDir, configName))