Commit e6e9ebe4 authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

make Sysutil.path_of_file treat trailing "/" correctly

parent f0e720b8
......@@ -151,10 +151,13 @@ let path_of_file f =
let d = Filename.dirname f in
if d = Filename.current_dir_name then
(* f is relative to the current dir *)
aux (f::acc) (Sys.getcwd ())
let b = Filename.basename f in
aux (b::acc) (Sys.getcwd ())
else if f=d then
(* we are at the root *)
let b = Filename.basename f in
if b=Filename.current_dir_name then acc else
if f=b then b::acc else
aux (b::acc) d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment