diff --git a/src/filescanner.c b/src/filescanner.c index b61ca3c1..156e00d4 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -744,6 +744,14 @@ process_inotify_file(struct watch_info *wi, char *path, struct inotify_event *ie { DPRINTF(E_LOG, L_SCAN, "Could not stat() '%s': %s\n", file, strerror(errno)); + free(deref); + return; + } + + if (S_ISDIR(sb.st_mode)) + { + process_inotify_dir(wi, deref, ie); + free(deref); return; }