GNU bug report logs - #21241
25.0.50; gfilenotify doesn't indicate when limits are reached

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Wed, 12 Aug 2015 08:18:02 UTC

Severity: normal

Found in version 25.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 21241 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 21241 <at> debbugs.gnu.org
Subject: Re: bug#21241: 25.0.50;
 gfilenotify doesn't indicate when limits are reached
Date: Fri, 21 Aug 2015 11:46:28 +0200
Tassilo Horn <tsdh <at> 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.




This bug report was last modified 9 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.