aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-12 16:57:47 +0100
committerBjörn Gustavsson <[email protected]>2013-02-13 06:46:40 +0100
commit26d858437e21c222439f272ce9eb244d4869d339 (patch)
treeb55d5629b9310dc8ffbcac38f6831038e9f65944 /lib
parentcd08400f92ec7672025bf39a458effcf33a423dc (diff)
downloadotp-26d858437e21c222439f272ce9eb244d4869d339.tar.gz
otp-26d858437e21c222439f272ce9eb244d4869d339.tar.bz2
otp-26d858437e21c222439f272ce9eb244d4869d339.zip
edoc: Fix building of documentation in sub directories
8115c0840527 broke building for projects that used sub directories (but not packages).
Diffstat (limited to 'lib')
-rw-r--r--lib/edoc/src/edoc_lib.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/edoc/src/edoc_lib.erl b/lib/edoc/src/edoc_lib.erl
index 3d193c4bfa..d9c225e099 100644
--- a/lib/edoc/src/edoc_lib.erl
+++ b/lib/edoc/src/edoc_lib.erl
@@ -865,11 +865,14 @@ find_sources_2(Dir, Pkg, Rec, Ext, Skip) ->
[]
end.
-find_sources_3(Es, Dir, '', Rec, Ext, Skip) ->
+find_sources_3(Es, Dir, Pkg, Rec, Ext, Skip) ->
[find_sources_2(filename:join(Dir, E),
- to_atom(E), Rec, Ext, Skip)
+ to_atom(join(Pkg, E)), Rec, Ext, Skip)
|| E <- Es, is_package_dir(E, Dir)].
+join('', E) -> E;
+join(Pkg, E) -> filename:join(Pkg, E).
+
is_source_file(Name, Ext) ->
(filename:extension(Name) == Ext)
andalso is_name(filename:rootname(Name, Ext)).