Fix errors with previous commit
This commit is contained in:
parent
794fd6b47b
commit
941f135047
|
@ -187,12 +187,12 @@ local function scan_project_folder(index)
|
|||
print("DEBUG setting files limit FLAG for", dir.name)
|
||||
dir.files_limit = true
|
||||
-- Watch non-recursively
|
||||
dir.watch_id = system.watch_dir(path, false)
|
||||
dir.watch_id = system.watch_dir(dir.name, false)
|
||||
if core.status_view then -- May be not yet initialized.
|
||||
show_max_files_warning()
|
||||
end
|
||||
else
|
||||
dir.watch_id = system.watch_dir(path, true)
|
||||
dir.watch_id = system.watch_dir(dir.name, true)
|
||||
end
|
||||
dir.files = t
|
||||
core.dir_rescan_add_job(dir, ".")
|
||||
|
|
10
src/dmon.h
10
src/dmon.h
|
@ -840,14 +840,14 @@ DMON_API_IMPL bool dmon_watch_rm(dmon_watch_id id, const char* watchdir)
|
|||
pthread_mutex_unlock(&_dmon.mutex);
|
||||
return false;
|
||||
}
|
||||
inotify_rm_watch(fd, watch->wds[i]);
|
||||
inotify_rm_watch(watch->fd, watch->wds[i]);
|
||||
|
||||
for (int j = i; j < c - 1; j++) {
|
||||
memcpy(watch->subdir + j, watch->subdir + j + 1, sizeof(dmon__watch_subdir));
|
||||
memcpy(watch->wds + j, watch->wds + j + 1, sizeof(int));
|
||||
memcpy(watch->subdirs + j, watch->subdirs + j + 1, sizeof(dmon__watch_subdir));
|
||||
memcpy(watch->wds + j, watch->wds + j + 1, sizeof(int));
|
||||
}
|
||||
stb__sbraw(watch->subdir)[1] = c - 1;
|
||||
stb__sbraw(watch->wds )[1] = c - 1;
|
||||
stb__sbraw(watch->subdirs)[1] = c - 1;
|
||||
stb__sbraw(watch->wds)[1] = c - 1;
|
||||
|
||||
pthread_mutex_unlock(&_dmon.mutex);
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue