Index: sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart b/sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart |
index 89f474ce3656768160f153a71e78161eaf534ea9..bc1c7ec8c582e6ecc9d8d17f67d9c798e35a0a4d 100644 |
--- a/sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart |
+++ b/sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart |
@@ -26,6 +26,11 @@ void watchSources(PackageGraph graph, Barback barback) { |
// TODO(nweiz): close these watchers when [barback] is closed. |
var watcher = new DirectoryWatcher(subdirectory); |
watcher.events.listen((event) { |
+ // Don't watch files symlinked into these directories. |
+ // TODO(rnystrom): If pub gets rid of symlinks, remove this. |
+ var parts = path.split(event.path); |
+ if (parts.contains("packages") || parts.contains("assets")) return; |
+ |
var id = new AssetId(package.name, |
path.relative(event.path, from: package.dir)); |
if (event.type == ChangeType.REMOVE) { |