Linux file watcher: reset manual watch list on emptying roots

This commit is contained in:
Roman Shevchenko
2012-07-12 18:28:47 +02:00
parent 9aa31d908d
commit a091e82d48
3 changed files with 1 additions and 0 deletions
Binary file not shown.
Binary file not shown.
+1
View File
@@ -250,6 +250,7 @@ static bool update_roots(array* new_roots) {
unregister_roots();
if (array_size(new_roots) == 0) {
output("UNWATCHEABLE\n/\n#\n");
return true;
}
else if (array_size(new_roots) == 1 && strcmp(array_get(new_roots, 0), "/") == 0) { // refuse to watch entire tree