[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 21c2b4a: * src/gfilenotify.c (Fgfile_add_watch):
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 21c2b4a: * src/gfilenotify.c (Fgfile_add_watch): |
Date: |
Fri, 21 Aug 2015 09:41:12 +0000 |
branch: master
commit 21c2b4ac52e2b1eb971e6f1e039db9108949e0eb
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
* src/gfilenotify.c (Fgfile_add_watch):
Handle errors from g_file_monitor.
---
src/gfilenotify.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 5488fa3..5c6ebe6 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -150,6 +150,7 @@ will be reported only in case of the `moved' event. */)
GFile *gfile;
GFileMonitor *monitor;
GFileMonitorFlags gflags = G_FILE_MONITOR_NONE;
+ GError *gerror = NULL;
/* Check parameters. */
CHECK_STRING (file);
@@ -172,7 +173,14 @@ 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);
+ monitor = g_file_monitor (gfile, gflags, NULL, &gerror);
+ if (gerror)
+ {
+ char msg[1024];
+ strcpy (msg, gerror->message);
+ g_error_free (gerror);
+ xsignal1 (Qfile_notify_error, build_string (msg));
+ }
if (! monitor)
xsignal2 (Qfile_notify_error, build_string ("Cannot watch file"), file);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 21c2b4a: * src/gfilenotify.c (Fgfile_add_watch):,
Michael Albinus <=