Commit Graph
515 Commits
Author SHA1 Message Date
matarc d4e5e93784 Forward FSEventsUserDropped, FSEventsKernelDropped, FSEventsMustScanSubDirs 2019-02-14 08:51:26 +00:00
Pawel Knap 629144ba06 Merge pull request #168 from FabianKramm/master
readdcw: Call readdirchangesw if GetQueuedCompletionStatus retrieves zero bytes (Fixes #167)
2018-11-26 19:32:43 +01:00
Fabian Kramm 8c84b4393e Readdirchanges if lpNumberOfBytes is zero 2018-11-26 16:32:28 +01:00
Rafal Jeczalik 352c463f90 Merge pull request #166 from HaraldNordgren/master
Bump Travis versions
2018-10-26 01:13:18 +02:00
Harald Nordgren 73fca84166 Bump Travis versions 2018-10-21 22:32:52 +02:00
Rafal Jeczalik 69d839f37b notify: add module file 2018-09-27 03:59:48 +02:00
Rafal Jeczalik 0f065fa99b Merge pull request #162 from nonsense/remove-refZero
use C.kCFAllocatorDefault instead of refZero
2018-08-27 21:31:19 +02:00
Anton Evangelatov 73bc5b1b2e use C.kCFAllocatorDefault instead of refZero 2018-08-27 14:14:59 +02:00
Rafal Jeczalik 4e54e7fd04 Merge pull request #160 from rjeczalik/ci-update
ci: update go version
2018-08-08 22:39:25 +02:00
Rafal Jeczalik 142bf8bda3 ci: update go version 2018-08-06 20:38:25 +02:00
Rafal Jeczalik 73af26f04f Merge pull request #159 from syncthing/fix-158
Make some nils zero on Go 1.11+ (fixes #158)
2018-08-06 20:34:18 +02:00
Jakob Borg 29bf891c8a Make some nils zero on Go 1.11+ (fixes #158) 2018-08-06 20:11:56 +02:00
Rafal Jeczalik 52ae50d849 Merge pull request #156 from imsodin/fseventsPanic
fsevents: Prevent nil deref
2018-06-26 07:11:56 +02:00
Simon Frei 2928bd11b5 fsevents: Prevent nil deref 2018-06-26 01:13:58 +02:00
Rafal Jeczalik f7ce7f74cc Merge pull request #151 from imsodin/panicKqueue
kqueue: Don't panic when an error occurs on init (fixes #149)
2018-06-24 13:11:49 +02:00
Rafal Jeczalik 808e64cd49 Merge pull request #152 from rjeczalik/issue150
readdcw: close handle during unwatch state
2018-06-24 13:10:51 +02:00
Pawel Knap 1c8cc4a6e5 readdcw: close handle pointed by local var 2018-05-27 10:53:49 +02:00
Pawel Knap f822991fc0 readdcw: close handle during unwatch state
The Unwatch method on Windows is asynchronous. Thus when calling
Watch, Unwatch and Watch on the same path the Unwatch state may
happen after the second Watch call. This means that second Watch
will be skipped as already created.

This commit makes second Watch call invalidate Unwatch state. So
Watch->Unwatch->Watch will be basically a no-op. This doesn't
solve all the problems since the second Watch might have different
events to handle. However, this should be solved by using Rewatch
method.

Also, the code fixes a data race that may occur when invalidating
grip handle.

Fixes: #150
2018-05-01 21:03:15 +02:00
Simon Frei db81c87f89 kqueue: Don't panic when an error occurs on init (fixes #149) 2018-03-15 21:17:10 +01:00
Rafal Jeczalik d152f3ce35 Merge pull request #147 from OrlovEvgeny/patch-1
Update README.md
2018-03-12 22:30:58 +01:00
O.J c6074a0eb1 Update README.md
comfortable  filesystem watcher and compress new jpeg image.
Rafal Jeczalik thnx thanks for your fsnotify
2018-03-05 18:49:59 +03:00
Rafal Jeczalik c31e5f2cb2 Merge pull request #143 from calmh/revert-135
Revert "Handle pointers that are now integers in Go 1.10 (fixes #135)"
2018-02-03 15:01:15 +01:00
Jakob Borg a05584dd18 Revert "Handle pointers that are now integers in Go 1.10 (fixes #135)"
This reverts commit ff2d4d2ced.
2018-02-03 13:37:49 +01:00
Rafal Jeczalik 76fd86f034 Merge pull request #144 from rjeczalik/travis
travis: run against tip
2018-02-03 13:34:52 +01:00
Rafal Jeczalik 524047783d travis: run against tip
Running against tip in order to allow for noticing any breaking
changes with upcomming Go release.
2018-02-03 13:18:21 +01:00
Rafal Jeczalik 27b537f072 Merge pull request #141 from fjl/runloop-nosleep
FSEvents: remove time.Sleep call in run loop setup
2018-01-03 14:19:05 +01:00
Felix Lange 39d22abc30 FSEvents: remove time.Sleep call in run loop setup 2018-01-03 12:55:54 +01:00
Rafal Jeczalik 3b49c6f529 Merge pull request #140 from fjl/lock-runloop-thread
FSEvents: lock the CF run loop goroutine to its thread
2018-01-03 12:53:31 +01:00
Felix Lange b76ef5c808 FSEvents: lock the CF run loop goroutine to its thread
CoreFoundation run loops are tied to a particular thread. The goroutine
that sets up the run loop may get rescheduled on a different thread just
after adding the source. In that case the run loop would exit immediately.

Fix this by locking the goroutine to its thread. The thread is wasted on
the run loop anyway, so we might as well claim it earlier.
2018-01-03 11:38:10 +01:00
Rafal Jeczalik e1801ee34d Merge pull request #136 from calmh/go110
Handle pointers that are now integers in Go 1.10 (fixes #135)
2017-12-10 16:45:11 +01:00
Rafal Jeczalik db283209f3 Merge pull request #134 from imsodin/errTrav
node: Return traverse error as os.PathError
2017-12-10 16:43:54 +01:00
Jakob Borg ff2d4d2ced Handle pointers that are now integers in Go 1.10 (fixes #135)
The Core Services reference types became integer shaped after being
pointer shaped in Go 1.9. I moved the thing out into a constant zero or
nil variable according to the Go version, in order to avoid duplicating
a bunch of code into separate files.

This is the required fix according to
https://go-review.googlesource.com/c/go/+/66332.

This passes tests with Go 1.9.2. and 1.10beta1.
2017-12-09 08:29:52 +01:00
Simon Frei 98ab9e8733 node: Return traverse error as os.PathError 2017-11-20 12:34:23 +01:00
Rafal Jeczalik 767eb674ef Merge pull request #128 from imsodin/debug
Use log package for timestamps and enable debugging via env var NOTIFY_DEBUG
2017-10-21 16:01:06 +02:00
Rafal Jeczalik 1aa3b9de8d Merge pull request #129 from imsodin/unwatch
Some fixes regarding unwatching and rewatching a path
2017-10-04 18:12:31 +02:00
Simon Frei 9a90a47d6a readdcw: Don't use atomic when lock is held 2017-10-04 11:12:13 +02:00
Simon Frei a65f5f9438 readdcw: Some useful debug logging 2017-10-04 11:12:13 +02:00
Simon Frei 46fab92b43 readdcw: polish (defer r.Unlock() where appropriate) 2017-10-04 11:12:13 +02:00
Simon Frei e2ec27759c trigger: Specify common watched structure in watcher_trigger.go (dedup) 2017-10-04 11:12:13 +02:00
Simon Frei a55fe7652f trigger: typo when watching fails (return nil -> err) 2017-10-04 11:12:13 +02:00
Simon Frei 9c33e90b31 trigger: When unwatching, rewatch in the correct mode (dir/ndir) 2017-10-04 11:12:13 +02:00
Simon Frei 734d8904e3 inotify: Handle removing of watches on non-existing paths 2017-10-04 11:12:13 +02:00
Simon Frei 40b317d744 fsevents: Don't canonicalize paths, tree does it already 2017-10-04 11:12:13 +02:00
Simon Frei 1687b0015e readdcw: Manually send unwatch events when watched file/folder was removed 2017-10-04 11:12:13 +02:00
Simon Frei de41129de4 readdcw: Fix race (missing lock) 2017-10-04 11:12:13 +02:00
Simon Frei cea90c3ac0 readdcw: check state on every loop iteration 2017-10-04 11:12:13 +02:00
Simon Frei 07c566ed13 Add tests for unwatching and then watching the same path and set test timeout 2017-10-04 11:12:10 +02:00
Simon Frei 732152040a trigger: Check that no watches remain on close 2017-08-31 13:38:10 +02:00
Simon Frei ca15b52885 tests: pass root dir of testing watcher through cleanpath 2017-08-31 13:37:54 +02:00
Simon Frei f419c004ac Use log package for timestamps and enable debugging via env var NOTIFY_DEBUG 2017-08-28 00:21:55 +02:00