haskell-fswatch / hfsnotify

Unified Haskell interface for basic file system notifications
BSD 3-Clause "New" or "Revised" License
136 stars 40 forks source link

CloseHandle: invalid argument on Windows #78

Closed snoyberg closed 6 years ago

snoyberg commented 6 years ago

When working on the fsnotify-conduit test suite, I ran into seemingly unrelated errors on Windows. I was able to reduce it to the following test case:

#!/usr/bin/env stack
-- stack --resolver lts-11.8 script
import System.FSNotify
import System.Directory
import UnliftIO (tryIO, withSystemTempDirectory)

main :: IO ()
main =
  withSystemTempDirectory "fsnotify-test" $ \dir ->
  withManager $ \man -> do
    stop <- watchDir man dir (const True) print
    stop

This results in the output:

 CloseHandle: invalid argument (The handle is invalid.)
thomasjm commented 6 years ago

Thanks for the report @snoyberg -- this fix will go out when I release version 0.3.0.0

snoyberg commented 6 years ago

Thanks!

On Mon, May 28, 2018, 3:23 AM Tom McLaughlin notifications@github.com wrote:

Thanks for the report @snoyberg https://github.com/snoyberg -- this fix will go out when I release version 0.3.0.0

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/haskell-fswatch/hfsnotify/issues/78#issuecomment-392391019, or mute the thread https://github.com/notifications/unsubscribe-auth/AADBB16aV8oj9HzXlnLK993AzgQzmt_Gks5t20NugaJpZM4T82WS .