Fix "src" detection in the pub lish validator on Windows.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15866 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/utils/pub/command_lish.dart b/utils/pub/command_lish.dart
index 55237e9..3895232 100644
--- a/utils/pub/command_lish.dart
+++ b/utils/pub/command_lish.dart
@@ -142,6 +142,8 @@
       if (file == null || _BLACKLISTED_FILES.contains(basename(file))) {
         return false;
       }
+      // TODO(nweiz): Since `file` is absolute, this will break if the package
+      // itself is in a directory named "packages" (issue 7215).
       return !splitPath(file).some(_BLACKLISTED_DIRECTORIES.contains);
     }));
   }
diff --git a/utils/pub/validator/name.dart b/utils/pub/validator/name.dart
index 570f8b8..93c08ae 100644
--- a/utils/pub/validator/name.dart
+++ b/utils/pub/validator/name.dart
@@ -31,7 +31,9 @@
       return listDir(libDir, recursive: true);
     }).transform((files) {
       for (var file in files) {
-        if (file.contains("/src/")) continue;
+        // TODO(nweiz): Since `file` is absolute, this will break if the package
+        // itself is in a directory named "src" (issue 7215).
+        if (splitPath(file).contains("src")) continue;
         if (new Path(file).extension != 'dart') continue;
         var libName = new Path(basename(file)).filenameWithoutExtension;
         _checkName(libName, 'The name of "$file", "$libName",');