mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix accidental duplicate code from rebase
This commit is contained in:
@@ -65,35 +65,6 @@ exports.watch = function watch(absPath, callback) {
|
||||
}
|
||||
};
|
||||
|
||||
var fallBack = function () {
|
||||
// Disallow future uses of pathwatcher.watch.
|
||||
canUsePathwatcher = false;
|
||||
|
||||
// Convert any pathwatcher watchers we previously created to
|
||||
// files.watchFile watchers.
|
||||
_.each(switchFunctions.splice(0), function (switchToPolling) {
|
||||
switchToPolling();
|
||||
});
|
||||
|
||||
require("./console.js").Console.warn(
|
||||
"Falling back to files.watchFile instead of pathwatcher.watch..."
|
||||
);
|
||||
};
|
||||
|
||||
try {
|
||||
// Watch the candidate directory using pathwatcher.watch.
|
||||
var watcher = files.pathwatcherWatch(dir, cleanUp);
|
||||
} catch (err) {
|
||||
// If the directory did not exist, do not treat this failure as
|
||||
// evidence against pathwatcher.watch, but simply return and leave
|
||||
// canUsePathwatcher set to true.
|
||||
if (err instanceof TypeError && err.message === "Unable to watch path") {
|
||||
return;
|
||||
}
|
||||
|
||||
throw err;
|
||||
}
|
||||
|
||||
var pollingInterval = watcher
|
||||
? DEFAULT_POLLING_INTERVAL : NO_PATHWATCHER_POLLING_INTERVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user