... | ... |
@@ -7,7 +7,7 @@ |
7 | 7 |
# README |
8 | 8 |
my $type; |
9 | 9 |
my $lines; |
10 |
- my $readme_path = defined $dir ? "$dir/README" : 'README'; |
|
10 |
+ my $readme_path = (defined $dir && $dir ne '') ? "$dir/README" : 'README'; |
|
11 | 11 |
eval { $lines = app->git->blob($user, $project, $rev, $readme_path) }; |
12 | 12 |
my $readme_e; |
13 | 13 |
if ($lines) { |
... | ... |
@@ -41,9 +41,7 @@ |
41 | 41 |
%= include '/include/page_path', type => 'tree', Path => $dir; |
42 | 42 |
%= include '/include/tree'; |
43 | 43 |
|
44 |
- % if (!defined $dir || $dir eq '') { |
|
45 |
- %= include '/include/readme' |
|
46 |
- % } |
|
44 |
+ %= include '/include/readme', dir => $dir; |
|
47 | 45 |
</div> |
48 | 46 |
|
49 | 47 |
%= include '/include/footer'; |