diff options
Diffstat (limited to 'src/gfilenotify.c')
| -rw-r--r-- | src/gfilenotify.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 6ec5c642825..285a253733d 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c | |||
| @@ -178,20 +178,18 @@ will be reported only in case of the `moved' event. */) | |||
| 178 | if (NILP (Ffile_exists_p (file))) | 178 | if (NILP (Ffile_exists_p (file))) |
| 179 | report_file_error ("File does not exist", file); | 179 | report_file_error ("File does not exist", file); |
| 180 | 180 | ||
| 181 | CHECK_LIST (flags); | ||
| 182 | |||
| 183 | if (!FUNCTIONP (callback)) | 181 | if (!FUNCTIONP (callback)) |
| 184 | wrong_type_argument (Qinvalid_function, callback); | 182 | wrong_type_argument (Qinvalid_function, callback); |
| 185 | 183 | ||
| 186 | /* Create GFile name. */ | ||
| 187 | gfile = g_file_new_for_path (SSDATA (ENCODE_FILE (file))); | ||
| 188 | |||
| 189 | /* Assemble flags. */ | 184 | /* Assemble flags. */ |
| 190 | if (!NILP (Fmember (Qwatch_mounts, flags))) | 185 | if (!NILP (Fmember (Qwatch_mounts, flags))) |
| 191 | gflags |= G_FILE_MONITOR_WATCH_MOUNTS; | 186 | gflags |= G_FILE_MONITOR_WATCH_MOUNTS; |
| 192 | if (!NILP (Fmember (Qsend_moved, flags))) | 187 | if (!NILP (Fmember (Qsend_moved, flags))) |
| 193 | gflags |= G_FILE_MONITOR_SEND_MOVED; | 188 | gflags |= G_FILE_MONITOR_SEND_MOVED; |
| 194 | 189 | ||
| 190 | /* Create GFile name. */ | ||
| 191 | gfile = g_file_new_for_path (SSDATA (ENCODE_FILE (file))); | ||
| 192 | |||
| 195 | /* Enable watch. */ | 193 | /* Enable watch. */ |
| 196 | monitor = g_file_monitor (gfile, gflags, NULL, &gerror); | 194 | monitor = g_file_monitor (gfile, gflags, NULL, &gerror); |
| 197 | g_object_unref (gfile); | 195 | g_object_unref (gfile); |