Conversation
|
Sorry for the delay in reviewing this, the specs appear to be failing on Travis, are they passing for you locally? |
There was a problem hiding this comment.
Why is this path variable needed? Could fullpath be inserted into the handlemap instead?
There was a problem hiding this comment.
If you're watching a directory, handlemap contains the path of the directory, and the inotify events give you just the name of the file, so you have to take the directory path from the handlemap and add the filename to it. You can't put fullpath back into handlemap, because that would then be the modified file's full path, and the next modified file would then get an invalid path.
The path variable is just because I need to convert it to a std::vector, at least that's what it originally was, so I kept it to be safe. I'm not very good at C++ though.
|
I did have to modify them, because the tests were expecting the incorrect behavior (empty strings). |
|
Here's the output: More tests are skipped, but the three that failed on travis pass for me. Edit: travis is on os x, and apparently the os x version also returns an empty string in some cases, which now fails with the modified tests. |
3c3f88b to
c5dcd6f
Compare
|
Rebased. The tests pass on a linux host: https://travis-ci.org/nkovacs/node-pathwatcher/jobs/35714398, https://travis-ci.org/nkovacs/node-pathwatcher/jobs/35714399 |
#25