From: Eli Zaretskii Date: Thu, 21 Nov 2019 14:39:15 +0000 (+0200) Subject: Fix file notifications on macOS X-Git-Tag: emacs-27.0.90~561^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4f6980ad6bbe130f72904d443e66cf60ff1d71a4;p=emacs.git Fix file notifications on macOS * src/kqueue.c (Fkqueue_add_watch): Don't use encoded file names in objects and APIs that expect decoded multibyte strings. (Bug#38287) --- diff --git a/src/kqueue.c b/src/kqueue.c index 76d7fc1ecbd..1383d7d3654 100644 --- a/src/kqueue.c +++ b/src/kqueue.c @@ -414,7 +414,7 @@ only when the upper directory of the renamed file is watched. */) } /* Open file. */ - file = ENCODE_FILE (file); + Lisp_Object encoded_file = ENCODE_FILE (file); oflags = O_NONBLOCK; #if O_EVTONLY oflags |= O_EVTONLY; @@ -426,7 +426,7 @@ only when the upper directory of the renamed file is watched. */) #else oflags |= O_NOFOLLOW; #endif - fd = emacs_open (SSDATA (file), oflags, 0); + fd = emacs_open (SSDATA (encoded_file), oflags, 0); if (fd == -1) report_file_error ("File cannot be opened", file);