diff --git a/data/core/init.lua b/data/core/init.lua index 500c1c26..43064417 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -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, ".") diff --git a/src/dmon.h b/src/dmon.h index ad3dd730..8a9eddac 100644 --- a/src/dmon.h +++ b/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;