tag 447672 patch
thanks

Hi Radu,

I've created a (attached) patch for inotifywait to fix the bug
explained here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447672

Please commit it to SVN. again, this may need some coding style changes.

Thanks,
Ryan

-- 
_________________________
Ryan Niebur
ryanrya...@gmail.com
diff --git a/src/inotifywait.c b/src/inotifywait.c
index 9c031bc..e6fec43 100644
--- a/src/inotifywait.c
+++ b/src/inotifywait.c
@@ -129,6 +129,7 @@ void output_event_csv( struct inotify_event * event ) {
 int main(int argc, char ** argv)
 {
 	int events = 0;
+        int orig_events;
 	bool monitor = false;
 	int quiet = 0;
 	unsigned long int timeout = 0;
@@ -175,6 +176,10 @@ int main(int argc, char ** argv)
 	// If events is still 0, make it all events.
 	if (events == 0)
 		events = IN_ALL_EVENTS;
+        orig_events = events;
+        if ( monitor && recursive ) {
+                events = events | IN_CREATE | IN_MOVED_TO | IN_MOVED_FROM;
+        }
 
 	FileList list = construct_path_list( argc, argv, fromfile );
 
@@ -235,7 +240,7 @@ int main(int argc, char ** argv)
 			}
 		}
 
-		if ( quiet < 2 ) {
+		if ( quiet < 2 && (event->mask & orig_events) ) {
 			if ( csv ) {
 				output_event_csv( event );
 			}

Attachment: signature.asc
Description: Digital signature

Reply via email to