Comparing version 0.11.0 to 0.11.1
12
index.js
'use strict'; | ||
var EventEmitter = require('events').EventEmitter; | ||
var fs = require('fs'); | ||
var os = require('os'); | ||
var sysPath = require('path'); | ||
@@ -13,4 +12,4 @@ var each = require('async-each'); | ||
var isWin32 = os.platform() === 'win32'; | ||
var canUseFsEvents = os.platform() === 'darwin' && !!fsevents; | ||
var platform = require('os').platform(); | ||
var canUseFsEvents = platform === 'darwin' && fsevents; | ||
@@ -97,3 +96,5 @@ // To disable FSEvents completely. | ||
// Disable polling on Windows. | ||
if (undef('usePolling') && !opts.useFsEvents) opts.usePolling = !isWin32; | ||
if (undef('usePolling') && !opts.useFsEvents) { | ||
opts.usePolling = platform !== 'win32'; | ||
} | ||
@@ -410,6 +411,7 @@ this._isntIgnored = function(entry) { | ||
); | ||
if (!watcher) return; | ||
var broadcastErr = fsWatchBroadcast.bind(null, absPath, 'errHandlers'); | ||
watcher.on('error', function(error) { | ||
// Workaround for https://github.com/joyent/node/issues/4337 | ||
if (isWin32 && error.code === 'EPERM') { | ||
if (platform === 'win32' && error.code === 'EPERM') { | ||
fs.exists(item, function(exists) { | ||
@@ -416,0 +418,0 @@ if (exists) broadcastErr(error); |
{ | ||
"name": "chokidar", | ||
"description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "fs", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31561
667