mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-04 07:28:22 +00:00
8282397: createTempFile method of java.io.File is failing when called with suffix of spaces character
Reviewed-by: alanb
This commit is contained in:
parent
8d456ac0ec
commit
98d54e8eb2
@ -333,9 +333,12 @@ class WinNTFileSystem extends FileSystem {
|
||||
// is a ":" at position 1 and the first character is not a letter
|
||||
String pathname = f.getPath();
|
||||
int lastColon = pathname.lastIndexOf(":");
|
||||
if (lastColon > 1 ||
|
||||
(lastColon == 1 && !isLetter(pathname.charAt(0))))
|
||||
return true;
|
||||
|
||||
// Valid if there is no ":" present or if the last ":" present is
|
||||
// at index 1 and the first character is a latter
|
||||
if (lastColon < 0 ||
|
||||
(lastColon == 1 && isLetter(pathname.charAt(0))))
|
||||
return false;
|
||||
|
||||
// Invalid if path creation fails
|
||||
Path path = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user