summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-11-21 16:39:15 +0200
committerEli Zaretskii <eliz@gnu.org>2019-11-21 16:39:15 +0200
commit4f6980ad6bbe130f72904d443e66cf60ff1d71a4 (patch)
tree4318be770656a9d2ca637dabd48a9e0d8aedceee
parent80b8a6093b6b7657da135bec506eb55a700688d4 (diff)
downloademacs-4f6980ad6bbe130f72904d443e66cf60ff1d71a4.tar.gz
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)
-rw-r--r--src/kqueue.c4
1 files changed, 2 insertions, 2 deletions
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);