mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
This commit is contained in:
1 parent
e3908c1149
commit
46e6d5b622
9 files changed
+611
-152
No files matched your search
+7
-3
@@ -92,9 +92,13 @@ func (r *Reader) initRoot() error {
|
||||
// indexPackage 建立包路径索引,拒绝会使显示与验签产生歧义的同名条目
|
||||
// 返回: error 错误信息
|
||||
func (r *Reader) indexPackage() error {
|
||||
r.fileIndex = make(map[string]*zip.File)
|
||||
r.fileIndexFold = make(map[string]*zip.File)
|
||||
r.fileNamesFold = make(map[string]string)
|
||||
count := 0
|
||||
if r.Zip != nil {
|
||||
count = len(r.Zip.File)
|
||||
}
|
||||
r.fileIndex = make(map[string]*zip.File, count)
|
||||
r.fileIndexFold = make(map[string]*zip.File, count)
|
||||
r.fileNamesFold = make(map[string]string, count+len(r.files))
|
||||
if r.Zip != nil {
|
||||
for _, f := range r.Zip.File {
|
||||
if f.FileInfo().IsDir() {
|
||||
|
||||
Reference in new issue
Block a user