ugh?
This commit is contained in:
@ -29,6 +29,8 @@ static void filewatch_callback(dmon_watch_id watch_id,
|
||||
const char* oldfilepath,
|
||||
void* user)
|
||||
{
|
||||
(void)watch_id; (void)rootdir; (void)filepath; (void)oldfilepath;
|
||||
|
||||
enum FilewatchAction faction;
|
||||
|
||||
switch (action) {
|
||||
@ -41,6 +43,7 @@ static void filewatch_callback(dmon_watch_id watch_id,
|
||||
case DMON_ACTION_MODIFY:
|
||||
faction = FILEWATCH_ACTION_FILE_MODIFIED;
|
||||
break;
|
||||
case DMON_ACTION_MOVE:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@ -74,6 +77,8 @@ bool filewatch_add_directory(char const *dir, FileatchCallback callback) {
|
||||
};
|
||||
arrpush(filewatch_directories, w);
|
||||
dmon_watch(dir, filewatch_callback, DMON_WATCHFLAGS_RECURSIVE, (void *)(intptr_t)(arrlen(filewatch_directories) - 1));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -91,6 +96,8 @@ bool filewatch_add_file(char const *filepath, FileatchCallback callback) {
|
||||
};
|
||||
arrpush(filewatch_files, f);
|
||||
dmon_watch("./", filewatch_callback, 0, (void *)(intptr_t)(-arrlen(filewatch_files)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user