(minor) Bugfix in Path handling
This commit is contained in:
parent
4ee3f6ba3f
commit
3c7c77fe21
@ -31,11 +31,13 @@ public class FileLinks {
|
|||||||
|
|
||||||
private static void synthesizeFilenameKeyword(Set<String> fileKeywords, EdgeUrl link) {
|
private static void synthesizeFilenameKeyword(Set<String> fileKeywords, EdgeUrl link) {
|
||||||
|
|
||||||
Path pFilename = Path.of(link.path.toLowerCase()).getFileName();
|
int lastSlash = link.path.lastIndexOf('/');
|
||||||
|
if (lastSlash < 0) return;
|
||||||
|
|
||||||
if (pFilename == null) return;
|
String filename = link.path
|
||||||
|
.substring(lastSlash + 1)
|
||||||
|
.toLowerCase();
|
||||||
|
|
||||||
String filename = pFilename.toString();
|
|
||||||
if (filename.length() > 32
|
if (filename.length() > 32
|
||||||
|| filename.endsWith(".xml")
|
|| filename.endsWith(".xml")
|
||||||
|| filename.endsWith(".jpg")
|
|| filename.endsWith(".jpg")
|
||||||
|
Loading…
Reference in New Issue
Block a user