-let unmask_watch dir events =
- let _,handler = try Hashtbl.find masks dir with Not_found->fprintf logfd "unmask called without mask: %s\n" dir;flush logfd;raise Not_found in
- try
- Hashtbl.remove masks dir;
- add_watch dir events handler
- with Not_found -> ()
-
+let unmask_watch dir file =
+ if (Hashtbl.mem masks (dir,file)) then
+ begin
+ Hashtbl.remove masks (dir,file)
+ end
+ else
+ fprintf logfd "WARNING: %s,%s -- Unpaired unmask\n" dir file;flush logfd
+