On Wed, 16 Apr 2025 17:23:41 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
>> src/java.base/windows/classes/java/io/WinNTFileSystem.java line 372: >> >>> 370: int len = pathname.length(); >>> 371: if (len > 0 && pathname.charAt(len - 1) == ' ') >>> 372: return true; >> >> Can you think about "foo \bar" case too? > > I am not sure what you mean here as file paths _can_ contain (s) space(s). The question is about directories in the path that end with space. So yes, the file path may contain spaces but the proposed check is only looking at the end last element. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24635#discussion_r2047427427