{"action":"created","issue":{"url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/216","labels_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/216/comments","events_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/216/events","html_url":"https://github.com/floatdrop/gulp-watch/issues/216","id":130174300,"number":216,"title":"Watch won't trigger if some directory in the path starts with \"!\"","user":{"login":"dcby","id":10463160,"avatar_url":"https://avatars.githubusercontent.com/u/10463160?v=3","gravatar_id":"","url":"https://api.github.com/users/dcby","html_url":"https://github.com/dcby","followers_url":"https://api.github.com/users/dcby/followers","following_url":"https://api.github.com/users/dcby/following{/other_user}","gists_url":"https://api.github.com/users/dcby/gists{/gist_id}","starred_url":"https://api.github.com/users/dcby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcby/subscriptions","organizations_url":"https://api.github.com/users/dcby/orgs","repos_url":"https://api.github.com/users/dcby/repos","events_url":"https://api.github.com/users/dcby/events{/privacy}","received_events_url":"https://api.github.com/users/dcby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-31T19:52:53Z","updated_at":"2016-01-31T20:30:26Z","closed_at":null,"body":"I found that callback never fired if path that being watched contains a directory whose name is started with \"!\" (tested on Windows only).\r\n\r\nAssume we have three files:\r\n1. c:\\test\\1.txt\r\n2. c:\\\\_!test\\1.txt\r\n3. c:\\\\!test\\1.txt\r\n\r\n```javascript\r\nvar gulp = require(\"gulp\"), // 3.9.0\r\n\twatch = require(\"gulp-watch\"); // 4.3.5\r\n\r\nvar path = <path to file>;\r\n\r\ngulp.task(\"watch\", function () {\r\n\twatch(path, function () {\r\n\t\tconsole.log(\"trigger\");\r\n\t});\r\n});\r\n```\r\n\r\nThe callback WILL trigger in cases 1 and 2.\r\nThe callback WON'T trigger in case 3.\r\n\r\nAlthough `gulp.watch` works correctly in all cases. "},"comment":{"url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/comments/177602342","html_url":"https://github.com/floatdrop/gulp-watch/issues/216#issuecomment-177602342","issue_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/216","id":177602342,"user":{"login":"UltCombo","id":2090712,"avatar_url":"https://avatars.githubusercontent.com/u/2090712?v=3","gravatar_id":"","url":"https://api.github.com/users/UltCombo","html_url":"https://github.com/UltCombo","followers_url":"https://api.github.com/users/UltCombo/followers","following_url":"https://api.github.com/users/UltCombo/following{/other_user}","gists_url":"https://api.github.com/users/UltCombo/gists{/gist_id}","starred_url":"https://api.github.com/users/UltCombo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UltCombo/subscriptions","organizations_url":"https://api.github.com/users/UltCombo/orgs","repos_url":"https://api.github.com/users/UltCombo/repos","events_url":"https://api.github.com/users/UltCombo/events{/privacy}","received_events_url":"https://api.github.com/users/UltCombo/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T20:30:26Z","updated_at":"2016-01-31T20:30:26Z","body":"gulp 4 uses chokidar. IIRC gulp 3 uses gaze."}}