Skip to content

Conversation

@TrevorBurnham
Copy link

Anyone who uses node-watch-tree under Node 0.6 on a directory with files in it is going to get an error

Error: ENOTDIR, Not a directory 'dir/filename.ext'

It turns out the reason is—somewhat bafflingly—that the error code for ENOTDIR changed from 20 to 27, so the test err.errno == ENOTDIR in [stat.coffee[(https://github.com/tafa/node-watch-tree/blob/master/src/watchers/stat.coffee) fails. This patch changes the current err.errno checks to err.code checks. All tests pass.

Also, require 'util' is used instead of require 'sys' when running tests, since doing require 'sys' generates the distracting deprecation message

The "sys" module is now called "util". It should have a similar interface.

@matjaz
Copy link

matjaz commented Dec 5, 2011

this solves issue with 0.6.

@Cowboy-coder
Copy link

+1

4 similar comments
@cliffano
Copy link

cliffano commented Jan 7, 2012

+1

@holzmann
Copy link

+1

@tax
Copy link

tax commented Feb 1, 2012

+1

@sanandnarayan
Copy link

+1

@hereandnow
Copy link

+1 could you please merge this pull request, because i dont want to use trevors branch if not necessary...

@matjaz
Copy link

matjaz commented Feb 21, 2012

you can use
https://github.com/matjaz/node-watch-tree/tree/node-0.6
or updated NPM package from
https://github.com/matjaz/node-watch-tree/tree/npm-maintained

npm install watch-tree-maintained

@hereandnow
Copy link

alright, ty matjaz

@facetbi
Copy link

facetbi commented Feb 22, 2012

Perhaps less pressing, but the value of ENOENT also looks like it has changed. The value in the in node 0.6.11 is now 34 (defined on line 105 of deps/uv/include/uv.h). node-watch-tree has it specified as 2.

@matjaz
Copy link

matjaz commented Feb 22, 2012

you can't rely on error.errno. But I guess you can check error.code property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants