Linux file watcher: reset manual watch list on emptying roots; fix small leak
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Mon, 16 Jul 2012 12:16:49 +0000 (14:16 +0200)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Mon, 16 Jul 2012 14:00:17 +0000 (16:00 +0200)
bin/linux/fsnotifier
bin/linux/fsnotifier64
native/fsNotifier/linux/main.c

index b8d171f0250d5ac4327186c7f27be9c8c5341513..0e72f246193735ac42d2f75d3e9b876bca16bf42 100755 (executable)
Binary files a/bin/linux/fsnotifier and b/bin/linux/fsnotifier differ
index d77334c04a4de4e04834af8b83f416920e3b3ea2..74de18e5c244cb16d63492fdaf2639bd20820567 100755 (executable)
Binary files a/bin/linux/fsnotifier64 and b/bin/linux/fsnotifier64 differ
index 0c5dbf2120decb678d1969f607950349980a35ec..a3a24294c32cda2e7ea3a528b5461af8bb21d3b6 100644 (file)
@@ -250,7 +250,8 @@ static bool update_roots(array* new_roots) {
 
   unregister_roots();
   if (array_size(new_roots) == 0) {
-    output("UNWATCHEABLE\n/\n#\n");
+    output("UNWATCHEABLE\n#\n");
+    array_delete(new_roots);
     return true;
   }
   else if (array_size(new_roots) == 1 && strcmp(array_get(new_roots, 0), "/") == 0) {  // refuse to watch entire tree