Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
e6e9ebe4
Commit
e6e9ebe4
authored
Mar 10, 2012
by
Andrei Paskevich
Browse files
make Sysutil.path_of_file treat trailing "/" correctly
parent
f0e720b8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/util/sysutil.ml
View file @
e6e9ebe4
...
...
@@ -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 *)
acc
else
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
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment