summaryrefslogtreecommitdiff
path: root/src/dged
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-08-14 21:34:38 +0200
committerAlbert Cervin <albert@acervin.com>2024-08-14 21:34:38 +0200
commit8f456ac19e5e80eaa911645f882d184a534f87a4 (patch)
tree087ce06ec00fd8d7290f1c3d900a25c4af478d6a /src/dged
parent0849b6fa3ff76fb780b7ffd353d63c77c20e63e2 (diff)
downloaddged-8f456ac19e5e80eaa911645f882d184a534f87a4.tar.gz
dged-8f456ac19e5e80eaa911645f882d184a534f87a4.tar.xz
dged-8f456ac19e5e80eaa911645f882d184a534f87a4.zip
Do not reload buffer if it could not be watched
Previously it tried to reload the buffer even though it could not be watched.
Diffstat (limited to 'src/dged')
-rw-r--r--src/dged/reactor-epoll.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/dged/reactor-epoll.c b/src/dged/reactor-epoll.c
index ead0296..4c83b49 100644
--- a/src/dged/reactor-epoll.c
+++ b/src/dged/reactor-epoll.c
@@ -84,13 +84,7 @@ uint32_t reactor_watch_file(struct reactor *reactor, const char *path,
// TODO: change if we get more event types
mask = IN_CLOSE_WRITE;
- int fd = inotify_add_watch(reactor->inotify_fd, path, mask);
- if (fd == -1) {
- minibuffer_echo_timeout(4, "failed to watch %s: %s", path, strerror(errno));
- return 0;
- }
-
- return (uint32_t)fd;
+ return (uint32_t)inotify_add_watch(reactor->inotify_fd, path, mask);
}
void reactor_unwatch_file(struct reactor *reactor, uint32_t id) {