GithubHelp home page GithubHelp logo

sane not detect moved directory about sane HOT 4 OPEN

ggkovacs avatar ggkovacs commented on May 24, 2024
sane not detect moved directory

from sane.

Comments (4)

amasad avatar amasad commented on May 24, 2024

Which watcher are you using? And what operating system is this?
If you can adda test case for this here and send a pull request I'll be able to address it quickly https://github.com/amasad/sane/blob/master/test/test.js

from sane.

nkovacs avatar nkovacs commented on May 24, 2024

I wrote a shell script to test a couple interesting cases: https://github.com/nkovacs/sanetest
It watches test/ with glob **/*.txt.
What doesn't work:

  • with test2/test3/test.txt, moving test2 into test (the result is test/test2/test3/test.txt, which matches the glob)
    • after this move, writes to test/test2/test3/test.txt are not detected
  • with test2/test.txt, moving test2 to test
    • after this move, writes to test/test2/test.txt are detected
  • creating test/test2/test3 and then test/test2/test3/test.txt
    • this doesn't work even if there's a delay between creating the directory and the file

This is on linux with node 4, using sane 1.4.0

from sane.

nkovacs avatar nkovacs commented on May 24, 2024

Almost the same results on osx with node 4 (using nodewatcher), except the following doesn't work either:

  • creating test/test2/ and then test/test2/test.txt
    • this works if there's a delay between creating the directory and the file. On Linux it sometimes doesn't work without the delay, looks like a race condition.

from sane.

conartist6 avatar conartist6 commented on May 24, 2024

I too am finding that sane (@4.1.0) is unable to detect directories moving.

I'm on Mac OSX 10.13.6 and can replicate the issue with either watchman or nodewatcher by moving a folder with watched contents to trash. The watched files in the folder never receive remove events.

from sane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.