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

Unified Diff: utils/pub/io.dart

Issue 12907030: Work around issue 9278. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index a32c4714198b4e94c7e8969d3f1202177721bc63..59172c89a258e73f5e0296cdcaabb376ebce6755 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -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);
« 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