let compare path1 path2 = match relation_of_filename path1 path2 with SubDir -> -1 | UpDir -> 1 | Equal -> 0 | NoRelation i -> i