- frontend#mkdir (mk_rel_path fqp) (s.st_perm);
- Dirwatcher.add_watch fqp [S_Create;S_Delete] (Some(func)))
+ try begin
+ frontend#mkdir (mk_rel_path fqp) (s.st_perm);
+ Dirwatcher.add_watch fqp [S_Create;S_Delete] func
+ end
+ with _ ->
+ fprintf logfd "Could not create %s. Looks like a slice shot itself in the foot\n" fqp;flush logfd;
+ )
(** Gets called every time there's an inotify event at the backend
@param dirname Name of the backend directory
@param evlist Description of what happened
@param fname Name of the file that the event applies to
*)
(** Gets called every time there's an inotify event at the backend
@param dirname Name of the backend directory
@param evlist Description of what happened
@param fname Name of the file that the event applies to
*)
let fqp = String.concat "/" [dirname;fname] in
if ((Str.string_match file_regexp fname 0) && not (Str.string_match acl_file_regexp fname 0)) then
begin
let fqp = String.concat "/" [dirname;fname] in
if ((Str.string_match file_regexp fname 0) && not (Str.string_match acl_file_regexp fname 0)) then
begin
| Some(filter) -> List.filter (fun fe->Hashtbl.mem filter (fe#get_slice_name ())) frontend_lst
in
let is_event = list_check evlist in
| Some(filter) -> List.filter (fun fe->Hashtbl.mem filter (fe#get_slice_name ())) frontend_lst
in
let is_event = list_check evlist in
let fqp = String.concat "/" [dir;curfile] in
let acl_fqp = String.concat "." [fqp;"acl"] in
let acl_filter = this#make_filter acl_fqp in
let slice_list =
match acl_filter with
let fqp = String.concat "/" [dir;curfile] in
let acl_fqp = String.concat "." [fqp;"acl"] in
let acl_filter = this#make_filter acl_fqp in
let slice_list =
match acl_filter with