Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with KnownPathResource manager in native #32893

Merged
merged 1 commit into from
May 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ public List<Resource> list() {
SortedSet<String> dirSet = directories.tailSet(slashPath);

for (var s : List.of(fileSet, dirSet)) {
for (String i : s) {
for (String file : s) {
var i = file;
if (i.equals(slashPath)) {
continue;
}
Expand All @@ -143,6 +144,9 @@ public List<Resource> list() {
if (!i.substring(slashPath.length()).contains("/")) {
try {
Resource resource = underlying.getResource(i);
if (resource == null && directories.contains(file)) {
resource = new DirectoryResource(file);
}
if (resource == null) {
throw new RuntimeException("Unable to get listed resource " + i + " from directory " + path
+ " for path " + slashPath + " from underlying manager " + underlying);
Expand Down Expand Up @@ -212,4 +216,4 @@ public URL getUrl() {
return null;
}
}
}
}