Work around issue 9278.

Review URL: https://codereview.chromium.org//12907030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20577 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
nweiz@google.com 2013-03-27 20:53:25 +00:00
parent 3e4d359fce
commit ac18c8ced8

View file

@ -201,7 +201,12 @@ bool dirExists(String dir) => new Directory(dir).existsSync();
void deleteEntry(String path) {
if (linkExists(path)) {
log.io("Deleting link $path.");
new Link(path).deleteSync();
if (Platform.operatingSystem == 'windows') {
// TODO(nweiz): remove this when issue 9278 is fixed.
new Directory(path).deleteSync();
} else {
new Link(path).deleteSync();
}
} else if (dirExists(path)) {
log.io("Deleting directory $path.");
new Directory(path).deleteSync(recursive: true);