Skip to content

Commit

Permalink
lofs: use lstat rather than stat to generate qids
Browse files Browse the repository at this point in the history
This copes better with the case where the symlink is dangling. The
generated qid will refer to the symlink rather than the linked file.

Signed-off-by: David Scott <dave.scott@unikernel.com>
  • Loading branch information
djs55 committed Nov 29, 2015
1 parent 596401e commit 4f84da5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unix/lofs9p.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let errors_to_client = function

(* We need to associate files with Qids with unique ids and versions *)
let qid_of_path realpath =
Lwt_unix.LargeFile.stat realpath
Lwt_unix.LargeFile.lstat realpath
>>= fun stats ->
let open Types.Qid in
let flags =
Expand Down

0 comments on commit 4f84da5

Please sign in to comment.