summaryrefslogtreecommitdiff
path: root/src/rebar_dir.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2017-09-27 20:17:48 -0400
committerGitHub <noreply@github.com>2017-09-27 20:17:48 -0400
commit4352614e9b74ca9e6a54552afbb536049a08bc7c (patch)
treea01cef1a8c93e6a1c5d72d89a8f5ac6a82bbc0cb /src/rebar_dir.erl
parentc3f01c60139977dfad4723748e7c2f493fffd0ae (diff)
parentcf83eb7fc45fac677a83b5f38e87c581cf516cf2 (diff)
Merge pull request #1637 from ferd/re-fix-src-dir-specs
Corrects a fix to src_dir values
Diffstat (limited to 'src/rebar_dir.erl')
-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.