[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21241: 25.0.50; gfilenotify doesn't indicate when limits are reached
From: |
Michael Albinus |
Subject: |
bug#21241: 25.0.50; gfilenotify doesn't indicate when limits are reached |
Date: |
Fri, 21 Aug 2015 11:46:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Tassilo Horn <tsdh@gnu.org> writes:
> So I've tried the following:
>
> diff --git a/src/gfilenotify.c b/src/gfilenotify.c
> index 08713a8..2ad2110 100644
> --- a/src/gfilenotify.c
> +++ b/src/gfilenotify.c
> @@ -172,8 +172,9 @@ will be reported only in case of the 'moved' event. */)
> gflags |= G_FILE_MONITOR_SEND_MOVED;
>
> /* Enable watch. */
> - monitor = g_file_monitor (gfile, gflags, NULL, NULL);
> - if (! monitor)
> + GError *err = NULL;
> + monitor = g_file_monitor (gfile, gflags, NULL, &err);
> + if (! monitor || err != NULL)
> xsignal2 (Qfile_notify_error, build_string ("Cannot watch file"), file);
>
> Lisp_Object watch_descriptor = make_pointer_integer (monitor);
For the records, I've committed a modified version of this patch. It
returns the error message from g_file_monitor, if present.
Best regards, Michael.
bug#21241: 25.0.50; gfilenotify doesn't indicate when limits are reached, Paul Eggert, 2015/08/14
bug#21241: 25.0.50; gfilenotify doesn't indicate when limits are reached,
Michael Albinus <=