Hi all,
Could I know how to determine the allowable file length (the length of the absolute path) for a file in Window environment?
Due to some reason, I generated a zip file with a very long filename ( > 170) and put in a folder(the length of the folder path around 90). The length of the absolute path is around 260.
I used FileOutputStream with the ZipOutputStream to write out the zip file. Everything is working fine while i generating the zip file.
However, while i try to extract some files from the zip file i just created, i encountered the error
java.util.zip.ZipException The filename is too long.
I am using the class ZipFile to extract the files from the zip file like the following
String absPath = "A very long filepath which exceed 260";
ZipFile zipF = new ZipFile(absPath); //<-- here is the root cause
Is it possible to pre-determine the maximum allowable filepath length prior i generate the zip file ? This is weird since i got no error while i created the zip file, but have problem in extracting the zip file ......
Thanks