{"action":"created","comment":{"url":"https://api.github.com/repos/dart-lang/glob/pulls/comments/91212160","pull_request_review_id":11721702,"id":91212160,"diff_hunk":"@@ -332,35 +330,57 @@ class _ListTreeNode {\n       return resultGroup.stream;\n     }\n \n-    var resultController = new StreamController<FileSystemEntity>(sync: true);\n-    resultGroup.add(resultController.stream);\n-    new Directory(dir).list(followLinks: followLinks).listen((entity) {\n-      var basename = p.relative(entity.path, from: dir);\n-      if (_matches(basename)) resultController.add(entity);\n+    return StreamCompleter.fromFuture(() async {\n+      var entities = await new Directory(dir)\n+          .list(followLinks: followLinks).toList();\n+\n+      if (!_caseSensitive) {\n+        for (var sequence in children.keys) {\n+          var child = children[sequence];\n+          if (!child._isIntermediate) continue;\n+          if (entities.any((entity) =>\n+              sequence.matches(p.relative(entity.path, from: dir)))) {\n+            continue;\n+          }\n \n-      children.forEach((sequence, child) {\n-        if (entity is! Directory) return;\n-        if (!sequence.matches(basename)) return;\n-        var stream = child.list(p.join(dir, basename), followLinks: followLinks)\n-            .handleError((_) {}, test: (error) {\n-          // Ignore errors from directories not existing. We do this here so\n-          // that we only ignore warnings below wild cards. For example, the\n-          // glob \"foo/bar/*/baz\" should fail if \"foo/bar\" doesn't exist but\n-          // succeed if \"foo/bar/qux/baz\" doesn't exist.\n-          return error is FileSystemException &&\n-              (error.osError.errorCode == _ENOENT ||\n-              error.osError.errorCode == _ENOENT_WIN);\n-        });\n-        resultGroup.add(stream);\n-      });\n-    },\n-        onError: resultController.addError,\n-        onDone: () {\n-          resultController.close();\n-          resultGroup.close();\n-        });\n+          /// If there are no [entities] that match [sequence], manually list","path":"lib/src/list_tree.dart","position":65,"original_position":65,"commit_id":"f5d4488944bf47d18609cb41c3489ddb7772e799","original_commit_id":"f5d4488944bf47d18609cb41c3489ddb7772e799","user":{"login":"natebosch","id":7528195,"avatar_url":"https://avatars.githubusercontent.com/u/7528195?v=3","gravatar_id":"","url":"https://api.github.com/users/natebosch","html_url":"https://github.com/natebosch","followers_url":"https://api.github.com/users/natebosch/followers","following_url":"https://api.github.com/users/natebosch/following{/other_user}","gists_url":"https://api.github.com/users/natebosch/gists{/gist_id}","starred_url":"https://api.github.com/users/natebosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natebosch/subscriptions","organizations_url":"https://api.github.com/users/natebosch/orgs","repos_url":"https://api.github.com/users/natebosch/repos","events_url":"https://api.github.com/users/natebosch/events{/privacy}","received_events_url":"https://api.github.com/users/natebosch/received_events","type":"User","site_admin":false},"body":"[nit] this is a block comment not a doc comment. How about //","created_at":"2016-12-07T01:42:42Z","updated_at":"2016-12-07T01:50:36Z","html_url":"https://github.com/dart-lang/glob/pull/6#discussion_r91212160","pull_request_url":"https://api.github.com/repos/dart-lang/glob/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/glob/pulls/comments/91212160"},"html":{"href":"https://github.com/dart-lang/glob/pull/6#discussion_r91212160"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/glob/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/dart-lang/glob/pulls/6","id":96842819,"html_url":"https://github.com/dart-lang/glob/pull/6","diff_url":"https://github.com/dart-lang/glob/pull/6.diff","patch_url":"https://github.com/dart-lang/glob/pull/6.patch","issue_url":"https://api.github.com/repos/dart-lang/glob/issues/6","number":6,"state":"open","locked":false,"title":"Fix case-insensitive listing.","user":{"login":"nex3","id":188,"avatar_url":"https://avatars.githubusercontent.com/u/188?v=3","gravatar_id":"","url":"https://api.github.com/users/nex3","html_url":"https://github.com/nex3","followers_url":"https://api.github.com/users/nex3/followers","following_url":"https://api.github.com/users/nex3/following{/other_user}","gists_url":"https://api.github.com/users/nex3/gists{/gist_id}","starred_url":"https://api.github.com/users/nex3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nex3/subscriptions","organizations_url":"https://api.github.com/users/nex3/orgs","repos_url":"https://api.github.com/users/nex3/repos","events_url":"https://api.github.com/users/nex3/events{/privacy}","received_events_url":"https://api.github.com/users/nex3/received_events","type":"User","site_admin":false},"body":"This also marks a test as skipped to get all tests passing.\n\nCloses #5","created_at":"2016-12-07T01:38:00Z","updated_at":"2016-12-07T01:50:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2249f17f3f82963956c2af04bf870cc9b27f088e","assignee":{"login":"natebosch","id":7528195,"avatar_url":"https://avatars.githubusercontent.com/u/7528195?v=3","gravatar_id":"","url":"https://api.github.com/users/natebosch","html_url":"https://github.com/natebosch","followers_url":"https://api.github.com/users/natebosch/followers","following_url":"https://api.github.com/users/natebosch/following{/other_user}","gists_url":"https://api.github.com/users/natebosch/gists{/gist_id}","starred_url":"https://api.github.com/users/natebosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natebosch/subscriptions","organizations_url":"https://api.github.com/users/natebosch/orgs","repos_url":"https://api.github.com/users/natebosch/repos","events_url":"https://api.github.com/users/natebosch/events{/privacy}","received_events_url":"https://api.github.com/users/natebosch/received_events","type":"User","site_admin":false},"assignees":[{"login":"natebosch","id":7528195,"avatar_url":"https://avatars.githubusercontent.com/u/7528195?v=3","gravatar_id":"","url":"https://api.github.com/users/natebosch","html_url":"https://github.com/natebosch","followers_url":"https://api.github.com/users/natebosch/followers","following_url":"https://api.github.com/users/natebosch/following{/other_user}","gists_url":"https://api.github.com/users/natebosch/gists{/gist_id}","starred_url":"https://api.github.com/users/natebosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natebosch/subscriptions","organizations_url":"https://api.github.com/users/natebosch/orgs","repos_url":"https://api.github.com/users/natebosch/repos","events_url":"https://api.github.com/users/natebosch/events{/privacy}","received_events_url":"https://api.github.com/users/natebosch/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dart-lang/glob/pulls/6/commits","review_comments_url":"https://api.github.com/repos/dart-lang/glob/pulls/6/comments","review_comment_url":"https://api.github.com/repos/dart-lang/glob/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dart-lang/glob/issues/6/comments","statuses_url":"https://api.github.com/repos/dart-lang/glob/statuses/f5d4488944bf47d18609cb41c3489ddb7772e799","head":{"label":"dart-lang:fix-tests","ref":"fix-tests","sha":"f5d4488944bf47d18609cb41c3489ddb7772e799","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":28157395,"name":"glob","full_name":"dart-lang/glob","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/glob","description":"Bash-style filename globbing for Dart.","fork":false,"url":"https://api.github.com/repos/dart-lang/glob","forks_url":"https://api.github.com/repos/dart-lang/glob/forks","keys_url":"https://api.github.com/repos/dart-lang/glob/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/glob/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/glob/teams","hooks_url":"https://api.github.com/repos/dart-lang/glob/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/glob/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/glob/events","assignees_url":"https://api.github.com/repos/dart-lang/glob/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/glob/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/glob/tags","blobs_url":"https://api.github.com/repos/dart-lang/glob/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/glob/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/glob/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/glob/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/glob/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/glob/languages","stargazers_url":"https://api.github.com/repos/dart-lang/glob/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/glob/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/glob/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/glob/subscription","commits_url":"https://api.github.com/repos/dart-lang/glob/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/glob/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/glob/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/glob/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/glob/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/glob/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/glob/merges","archive_url":"https://api.github.com/repos/dart-lang/glob/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/glob/downloads","issues_url":"https://api.github.com/repos/dart-lang/glob/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/glob/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/glob/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/glob/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/glob/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/glob/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/glob/deployments","created_at":"2014-12-17T21:57:41Z","updated_at":"2016-09-24T14:59:38Z","pushed_at":"2016-12-07T01:38:00Z","git_url":"git://github.com/dart-lang/glob.git","ssh_url":"git@github.com:dart-lang/glob.git","clone_url":"https://github.com/dart-lang/glob.git","svn_url":"https://github.com/dart-lang/glob","homepage":"https://pub.dartlang.org/packages/glob","size":52,"stargazers_count":6,"watchers_count":6,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":6,"default_branch":"master"}},"base":{"label":"dart-lang:master","ref":"master","sha":"5f5015300328566887bf4118f6ae5cec57c4aaac","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":28157395,"name":"glob","full_name":"dart-lang/glob","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/glob","description":"Bash-style filename globbing for Dart.","fork":false,"url":"https://api.github.com/repos/dart-lang/glob","forks_url":"https://api.github.com/repos/dart-lang/glob/forks","keys_url":"https://api.github.com/repos/dart-lang/glob/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/glob/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/glob/teams","hooks_url":"https://api.github.com/repos/dart-lang/glob/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/glob/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/glob/events","assignees_url":"https://api.github.com/repos/dart-lang/glob/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/glob/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/glob/tags","blobs_url":"https://api.github.com/repos/dart-lang/glob/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/glob/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/glob/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/glob/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/glob/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/glob/languages","stargazers_url":"https://api.github.com/repos/dart-lang/glob/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/glob/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/glob/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/glob/subscription","commits_url":"https://api.github.com/repos/dart-lang/glob/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/glob/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/glob/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/glob/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/glob/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/glob/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/glob/merges","archive_url":"https://api.github.com/repos/dart-lang/glob/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/glob/downloads","issues_url":"https://api.github.com/repos/dart-lang/glob/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/glob/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/glob/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/glob/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/glob/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/glob/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/glob/deployments","created_at":"2014-12-17T21:57:41Z","updated_at":"2016-09-24T14:59:38Z","pushed_at":"2016-12-07T01:38:00Z","git_url":"git://github.com/dart-lang/glob.git","ssh_url":"git@github.com:dart-lang/glob.git","clone_url":"https://github.com/dart-lang/glob.git","svn_url":"https://github.com/dart-lang/glob","homepage":"https://pub.dartlang.org/packages/glob","size":52,"stargazers_count":6,"watchers_count":6,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dart-lang/glob/pulls/6"},"html":{"href":"https://github.com/dart-lang/glob/pull/6"},"issue":{"href":"https://api.github.com/repos/dart-lang/glob/issues/6"},"comments":{"href":"https://api.github.com/repos/dart-lang/glob/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/dart-lang/glob/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/dart-lang/glob/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dart-lang/glob/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/dart-lang/glob/statuses/f5d4488944bf47d18609cb41c3489ddb7772e799"}}}}
{"actor":{"display_login":"natebosch"}}