修复中文AndroidZipFile不能读取非ASCII字符文件名

This commit is contained in:
ag2s20150909
2023-01-09 08:08:21 +08:00
parent ff11cbe780
commit 973d7c6534
4 changed files with 35 additions and 11 deletions
@@ -39,7 +39,7 @@ public final class PfdHelper {
public static long length(ParcelFileDescriptor pfd) throws IOException {
try {
return android.system.Os.lseek(pfd.getFileDescriptor(), 0, OsConstants.SEEK_END);
return android.system.Os.fstat(pfd.getFileDescriptor()).st_size; //android.system.Os.lseek(pfd.getFileDescriptor(), 0, OsConstants.SEEK_END);
} catch (ErrnoException e) {
throw rethrowAsIOException(e);
}