Skip to content

Commit

Permalink
Do not include empty directories as packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tjwatson committed Jun 11, 2024
1 parent 998d27a commit 2ec4e6f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1663,9 +1663,11 @@ void addPackages(Bundle b)
try
{
content.getEntries().forEach((s) -> {
if (s.length() > 1 && s.endsWith("/") && s.indexOf('-') < 0)
int sLen = s.length();
int lastSlash = s.lastIndexOf('/');
if (sLen > 1 && s.indexOf('-') < 0 && lastSlash > 0 && lastSlash != sLen - 1)
{
String pkg = s.substring(0, s.length() - 1).replace('/', '.');
String pkg = s.substring(0, lastSlash).replace('/', '.');
packageToAtomosContent.put(pkg,
(AtomosContentIndexed) atomosContent);
}
Expand Down

0 comments on commit 2ec4e6f

Please sign in to comment.