erlang zip:unzip / 1 {error,bad_central_directory}和{error,bad_eocd} [英] erlang zip:unzip/1 {error, bad_central_directory} and {error, bad_eocd}

查看:508
本文介绍了erlang zip:unzip / 1 {error,bad_central_directory}和{error,bad_eocd}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地使用了erlang stdlib library zip:unzip / 1 昨晚我打了一个酒吧,出现这个错误:

I have always used erlang stdlib library zip:unzip/1 successfully. Last night i hit a bar with this error:


E:\WimaxStatsParser-1.1>erl
Eshell V5.9.2  (abort with ^G)
1> zip:unzip("e:/WimaxStatsParser-1.1/in/SomeZipFile.zip").
{error,bad_central_directory}
2>

有人帮忙解释这个原因?我怎么绕过它?


添加



我在另一个文件上收到一些其他错误: {error,bad_eocd} 。请解释一下。

Some one help explain the cause for this ? and how i get around it ?

ADDITIONS


I got some other error on another file: {error,bad_eocd}. Please explain this as well.

推荐答案

我无法根据您提供的信息重现您的问题。有两个可能发送此错误的功能:

I am not able to reproduce your problem with the information you give. There are 2 functions that may send this error:

get_cd_loop / 5和stdlib-1.18.2 / src / zip.erl中的get_name_extra_comment / 4。

get_cd_loop/5 and get_name_extra_comment/4 in stdlib-1.18.2/src/zip.erl .

应该很容易调试

将文件zip.erl,zip.hrl,file.hrl复制到工作目录中,

copy the file zip.erl, zip.hrl, file.hrl in a working directory,

使用debug_info选项编译,您将收到错误消息无法加载驻留在粘性目录中的模块,离开VM

compile with debug_info option, you will get the error message "Can't load module that resides in sticky dir", leave the VM

在stdlib中复制zip.beam ... / ebin

copy zip.beam in the stdlib.../ebin

在工作目录中重新启动VM,现在可以在zip中添加断点.erl来源。

restart the VM in the working directory, you can now add breakpoint in the zip.erl source.

BR

Pascal。

这篇关于erlang zip:unzip / 1 {error,bad_central_directory}和{error,bad_eocd}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆