Small fix
This commit is contained in:
@@ -93,10 +93,13 @@ let rec add_deep node = function
|
|||||||
add_direct one (add_deep node (rest, (find_or_infer_dir one dir))) dir
|
add_direct one (add_deep node (rest, (find_or_infer_dir one dir))) dir
|
||||||
| (_, dir) -> dir
|
| (_, dir) -> dir
|
||||||
|
|
||||||
let inc_nlink path tree =
|
let rec inc_nlink path tree =
|
||||||
add_deep
|
add_deep
|
||||||
(match find path tree with
|
(match find path tree with
|
||||||
| Some (File (o, md)) -> File (o, {md with st_nlink = md.st_nlink + 1})
|
| Some (File (o, md)) -> File (o, {md with st_nlink = md.st_nlink + 1})
|
||||||
|
| Some (InferredDirectory (o, md)) -> InferredDirectory (o, {md with st_nlink = md.st_nlink + 1})
|
||||||
|
| Some (Symlink (o, md)) -> Symlink (o, {md with st_nlink = md.st_nlink + 1})
|
||||||
|
| Some (Hardlink p) -> inc_nlink p tree
|
||||||
| Some (Directory (o, md)) -> Directory (o, {md with st_nlink = md.st_nlink + 1})
|
| Some (Directory (o, md)) -> Directory (o, {md with st_nlink = md.st_nlink + 1})
|
||||||
| _ -> failwith "can't increase hardlink count...")
|
| _ -> failwith "can't increase hardlink count...")
|
||||||
(clean_path path, tree)
|
(clean_path path, tree)
|
||||||
|
|||||||
Reference in New Issue
Block a user