fix(path): remove trailing dots from path components for Windows compatibility (#1786)

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
This commit is contained in:
Balázs Szücs
2025-12-07 15:17:27 -07:00
committed by GitHub
parent 5e5bb41585
commit afe9c59380
2 changed files with 46 additions and 0 deletions
@@ -266,6 +266,9 @@ public class PathPatternResolver {
if (component.getBytes(StandardCharsets.UTF_8).length > MAX_FILESYSTEM_COMPONENT_BYTES) {
component = truncatePathComponent(component, MAX_FILESYSTEM_COMPONENT_BYTES);
}
while (component.endsWith(".")) {
component = component.substring(0, component.length() - 1);
}
}
if (i > 0) result.append("/");