Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
c5bd6a8c
Commit
c5bd6a8c
authored
Jun 09, 2014
by
Ronny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改zipjs L719 catch
parent
61db630e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
zip.js
lib/zip.js
+10
-4
mindmanager.js
src/protocal/mindmanager.js
+4
-0
xmind.js
src/protocal/xmind.js
+4
-0
No files found.
lib/zip.js
View file @
c5bd6a8c
...
@@ -716,11 +716,17 @@
...
@@ -716,11 +716,17 @@
function
seekEOCDR
(
offset
,
entriesCallback
)
{
function
seekEOCDR
(
offset
,
entriesCallback
)
{
reader
.
readUint8Array
(
reader
.
size
-
offset
,
offset
,
function
(
bytes
)
{
reader
.
readUint8Array
(
reader
.
size
-
offset
,
offset
,
function
(
bytes
)
{
var
dataView
=
getDataHelper
(
bytes
.
length
,
bytes
).
view
;
var
dataView
=
getDataHelper
(
bytes
.
length
,
bytes
).
view
;
if
(
dataView
.
getUint32
(
0
)
!=
0x504b0506
)
{
try
{
seekEOCDR
(
offset
+
1
,
entriesCallback
);
if
(
dataView
.
getUint32
(
0
)
!=
0x504b0506
)
{
}
else
{
seekEOCDR
(
offset
+
1
,
entriesCallback
);
entriesCallback
(
dataView
);
}
else
{
entriesCallback
(
dataView
);
}
}
catch
(
e
){
console
.
log
(
e
);
onerror
(
ERR_READ
);
}
}
},
function
()
{
},
function
()
{
onerror
(
ERR_READ
);
onerror
(
ERR_READ
);
});
});
...
...
src/protocal/mindmanager.js
View file @
c5bd6a8c
...
@@ -74,6 +74,10 @@ KityMinder.registerProtocal( 'mindmanager', function () {
...
@@ -74,6 +74,10 @@ KityMinder.registerProtocal( 'mindmanager', function () {
return
result
;
return
result
;
}
}
function
onerror
(){
alert
(
'xmind文件过程解压出错,请检查该文件是否损坏'
);
}
function
getEntries
(
file
,
onend
)
{
function
getEntries
(
file
,
onend
)
{
zip
.
createReader
(
new
zip
.
BlobReader
(
file
),
function
(
zipReader
)
{
zip
.
createReader
(
new
zip
.
BlobReader
(
file
),
function
(
zipReader
)
{
zipReader
.
getEntries
(
onend
);
zipReader
.
getEntries
(
onend
);
...
...
src/protocal/xmind.js
View file @
c5bd6a8c
...
@@ -80,6 +80,10 @@ KityMinder.registerProtocal( 'xmind', function () {
...
@@ -80,6 +80,10 @@ KityMinder.registerProtocal( 'xmind', function () {
return
result
;
return
result
;
}
}
function
onerror
(){
alert
(
'xmind文件过程解压出错,请检查该文件是否损坏'
);
}
function
getEntries
(
file
,
onend
)
{
function
getEntries
(
file
,
onend
)
{
zip
.
createReader
(
new
zip
.
BlobReader
(
file
),
function
(
zipReader
)
{
zip
.
createReader
(
new
zip
.
BlobReader
(
file
),
function
(
zipReader
)
{
zipReader
.
getEntries
(
onend
);
zipReader
.
getEntries
(
onend
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment