Open
Description
Description
After moving a directory that hfsnotify is watching, hfsnotify reports changes inside that directory as if it had not been moved.
Only the NativeManager on Linux is affected.
I have not tested the NativeManager on OS X or Windows.
Steps to Reproduce
-
Run the following Bash script:
mkdir -p /tmp/example
-
Run the following Haskell program:
{-# LANGUAGE OverloadedStrings #-} import System.FSNotify import Control.Concurrent import Control.Monad main :: IO () main = withManager $ \mgr -> do _ <- watchTree mgr "/tmp/example" (const True) print forever (threadDelay maxBound)
-
While the Haskell program is running, run the following Bash script:
cd /tmp/example mkdir foo touch foo/test mv foo bar touch bar/test rm -rf bar
Expected Output
Added (FilePath "/tmp/example/foo/test") <TIMESTAMP>
Removed (FilePath "/tmp/example/foo/test") <TIMESTAMP>
Added (FilePath "/tmp/example/bar/test") <TIMESTAMP>
Modified (FilePath "/tmp/example/bar/test") <TIMESTAMP>
Removed (FilePath "/tmp/example/bar/test") <TIMESTAMP>
Actual Output
The following is printed from the Haskell program:
Added (FilePath "/tmp/example/foo/test") <TIMESTAMP>
Modified (FilePath "/tmp/example/foo/test") <TIMESTAMP>
Removed (FilePath "/tmp/example/foo/test") <TIMESTAMP>