diff options
| author | Eli Zaretskii | 2019-11-21 16:39:15 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-11-21 16:39:15 +0200 |
| commit | 4f6980ad6bbe130f72904d443e66cf60ff1d71a4 (patch) | |
| tree | 4318be770656a9d2ca637dabd48a9e0d8aedceee /src/kqueue.c | |
| parent | 80b8a6093b6b7657da135bec506eb55a700688d4 (diff) | |
| download | emacs-4f6980ad6bbe130f72904d443e66cf60ff1d71a4.tar.gz emacs-4f6980ad6bbe130f72904d443e66cf60ff1d71a4.zip | |
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)
Diffstat (limited to 'src/kqueue.c')
| -rw-r--r-- | src/kqueue.c | 4 |
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. */) | |||
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | /* Open file. */ | 416 | /* Open file. */ |
| 417 | file = ENCODE_FILE (file); | 417 | Lisp_Object encoded_file = ENCODE_FILE (file); |
| 418 | oflags = O_NONBLOCK; | 418 | oflags = O_NONBLOCK; |
| 419 | #if O_EVTONLY | 419 | #if O_EVTONLY |
| 420 | oflags |= O_EVTONLY; | 420 | oflags |= O_EVTONLY; |
| @@ -426,7 +426,7 @@ only when the upper directory of the renamed file is watched. */) | |||
| 426 | #else | 426 | #else |
| 427 | oflags |= O_NOFOLLOW; | 427 | oflags |= O_NOFOLLOW; |
| 428 | #endif | 428 | #endif |
| 429 | fd = emacs_open (SSDATA (file), oflags, 0); | 429 | fd = emacs_open (SSDATA (encoded_file), oflags, 0); |
| 430 | if (fd == -1) | 430 | if (fd == -1) |
| 431 | report_file_error ("File cannot be opened", file); | 431 | report_file_error ("File cannot be opened", file); |
| 432 | 432 | ||