-
Bug
-
Resolution: Fixed
-
P2
-
5.0u6, OpenJDK6, 6
-
b01
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2144408 | 7 | Xueming Shen | P2 | Closed | Fixed | b31 |
JDK-2152767 | OpenJDK6 | Xueming Shen | P2 | Resolved | Fixed | b02 |
JDK-2143015 | 5.0u11 | Xueming Shen | P2 | Resolved | Fixed | b01 |
Between 1.5.0_05 and 1.5.0_06 a length limit on 248 characters
was introduced on relative paths which can cause severe grievances
for people upgrading. Before the "fix" files of length 260 could be used.
import java.io.*;
public class TestPathLength {
private static String longFilename = "C:\\tmp\\.\\";
private static String padding = "1234567890123456789012345678901234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890";
public static void main(String[] args) {
for (int i = 230; i < 260; i++) {
String tmpName = longFilename + padding.substring(0, i) + ".txt";
try {
FileWriter fw = new FileWriter(tmpName);
fw.close();
} catch (Exception e) {
System.out.println("Failed at length: " + tmpName.length());
break;
}
}
}
}
was introduced on relative paths which can cause severe grievances
for people upgrading. Before the "fix" files of length 260 could be used.
import java.io.*;
public class TestPathLength {
private static String longFilename = "C:\\tmp\\.\\";
private static String padding = "1234567890123456789012345678901234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890";
public static void main(String[] args) {
for (int i = 230; i < 260; i++) {
String tmpName = longFilename + padding.substring(0, i) + ".txt";
try {
FileWriter fw = new FileWriter(tmpName);
fw.close();
} catch (Exception e) {
System.out.println("Failed at length: " + tmpName.length());
break;
}
}
}
}
- backported by
-
JDK-2143015 Uncanonicalized absolute filepath with length 248-260 no longer works (win)
- Resolved
-
JDK-2152767 Uncanonicalized absolute filepath with length 248-260 no longer works (win)
- Resolved
-
JDK-2144408 Uncanonicalized absolute filepath with length 248-260 no longer works (win)
- Closed
- relates to
-
JDK-4403166 File does not support long paths on WIndows NT
- Resolved