Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
jio
Commits
a1799a76
Commit
a1799a76
authored
Dec 15, 2016
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZipFileStorage: use .push() instead .then() thx
@cedric.leninivin
parent
0c196e40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
src/jio.storage/zipfilestorage.js
src/jio.storage/zipfilestorage.js
+11
-14
No files found.
src/jio.storage/zipfilestorage.js
View file @
a1799a76
...
...
@@ -63,28 +63,25 @@
* @constructor
*/
function
ZipFileStorage
(
spec
)
{
var
storage
=
this
,
zip
=
new
JSZip
();
if
(
spec
.
file
)
{
//if (spec.file instanceof Blob) {
// throw new TypeError("ZipFileStorage 'url' is not of type string");
//}
var
storage
=
this
;
this
.
_unzip_queue
=
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
zip
=
new
JSZip
();
return
zip
.
loadAsync
(
spec
.
file
,
{
createFolders
:
true
,
checkCRC32
:
true
})
.
then
(
function
()
{
storage
.
_zip
=
zip
;
return
zip
;
},
function
(
error
)
{
storage
.
_error
=
error
;
throw
error
;
})
;
})
;
})
.
push
(
function
()
{
storage
.
_zip
=
zip
;
return
zip
;
},
function
(
error
)
{
storage
.
_error
=
error
;
throw
error
;
});
}
else
{
this
.
_zip
=
new
JSZip
()
;
this
.
_zip
=
zip
;
}
}
...
...
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