Skip to content

Commit

Permalink
Issue #10084 - Introduce trailing slash only on ServletContext.getRes…
Browse files Browse the repository at this point in the history
…ourcePaths(String) again
  • Loading branch information
joakime committed Jul 10, 2023
1 parent f57cb04 commit 4927b1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,12 @@ public Set<String> getResourcePaths(String path)

HashSet<String> set = new HashSet<>();
for (Resource item: resource.list())
set.add(path + item.getFileName());
{
String entry = path + item.getFileName();
if (item.isDirectory())
entry = entry + '/';
set.add(entry);
}
return set;
}
catch (Exception e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1573,10 +1573,12 @@ public Set<String> getResourcePaths(String path)

HashSet<String> set = new HashSet<>();

for (Resource r: resource)
for (Resource item: resource.list())
{
for (Resource item: r.list())
set.add(path + item.getFileName());
String entry = path + item.getFileName();
if (item.isDirectory())
entry = entry + '/';
set.add(entry);
}
return set;
}
Expand Down

0 comments on commit 4927b1d

Please sign in to comment.