Merge remote-tracking branch 'origin/main' into 1.18
This commit is contained in:
commit
44d178bb89
|
|
@ -92,7 +92,7 @@ public abstract class PathResourcePackMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isValidCachedResourcePath(Path path) {
|
private boolean isValidCachedResourcePath(Path path) {
|
||||||
if(path.getFileName() == null)
|
if(path.getFileName() == null || path.getNameCount() == 0)
|
||||||
return false;
|
return false;
|
||||||
String str = path.toString();
|
String str = path.toString();
|
||||||
for(int i = 0; i < str.length(); i++) {
|
for(int i = 0; i < str.length(); i++) {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ public class CachedResourcePath {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CachedResourcePath(String s) {
|
public CachedResourcePath(String s) {
|
||||||
this(NO_PREFIX, SLASH_SPLITTER.splitToList(s));
|
// normalize so we can guarantee there are no empty sections
|
||||||
|
this(NO_PREFIX, SLASH_SPLITTER.splitToList(FileUtil.normalize(s)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> CachedResourcePath(String[] prefixElements, Collection<T> collection) {
|
public <T> CachedResourcePath(String[] prefixElements, Collection<T> collection) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user