summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_dir.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rebar_dir.erl b/src/rebar_dir.erl
index 7a779d1..7182c10 100644
--- a/src/rebar_dir.erl
+++ b/src/rebar_dir.erl
@@ -197,8 +197,10 @@ make_normalized_path([], NormalizedPath) ->
filename:join(lists:reverse(NormalizedPath));
make_normalized_path([H|T], NormalizedPath) ->
case H of
+ "." when NormalizedPath == [], T == [] -> make_normalized_path(T, ["."]);
"." -> make_normalized_path(T, NormalizedPath);
- ".." -> make_normalized_path(T, tl(NormalizedPath));
+ ".." when NormalizedPath == [] -> make_normalized_path(T, [".."]);
+ ".." when hd(NormalizedPath) =/= ".." -> make_normalized_path(T, tl(NormalizedPath));
_ -> make_normalized_path(T, [H|NormalizedPath])
end.