[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26127: 26.0.50; Using file-notify-rm-watch on invalid descriptor rai
bug#26127: 26.0.50; Using file-notify-rm-watch on invalid descriptor raises invalid-function
Fri, 17 Mar 2017 10:31:59 +0100
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
Andreas Politz <address@hidden> writes:
Thanks for the bug report!
> Calling file-notify-rm-watch on an invalid descriptor may throw a
> invalid-function error, but it should throw a file-notify-error instead.
`file-notify-error' shall appear only from `file-notify-add-watch'.
`file-notify-rm-watch' shall not raise an error at all.
> For example, this may occur when calling the function multiple times on
> the same descriptor.
> The error stems from file-notify--rm-descriptor, which contains the expression
> (cdr (assoc file (cdr registered)))
> `(,descriptor stopped ,(if file (expand-file-name file dir)
> , but (assoc file (cdr registered)) is nil. I think this error is
I've fixed this in the master branch; there shouldn't be an error anymore.
> Attached you'll find a test case for this.
Thanks also for this. I've added it, modified, to filenotify-tests.el.
Best regards, Michael.