Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
21c2b4ac
Commit
21c2b4ac
authored
Aug 21, 2015
by
Michael Albinus
Browse files
* src/gfilenotify.c (Fgfile_add_watch):
Handle errors from g_file_monitor.
parent
b77bdb50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/gfilenotify.c
src/gfilenotify.c
+9
-1
No files found.
src/gfilenotify.c
View file @
21c2b4ac
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment