MOBILE-3213 scorm: Fix unzip using emulator
parent
75ea013503
commit
5fa8f61d9d
|
@ -88,7 +88,7 @@ export class ZipMock extends Zip {
|
||||||
const destParent = destination.substring(0, source.lastIndexOf('/')),
|
const destParent = destination.substring(0, source.lastIndexOf('/')),
|
||||||
destFolderName = destination.substr(source.lastIndexOf('/') + 1);
|
destFolderName = destination.substr(source.lastIndexOf('/') + 1);
|
||||||
|
|
||||||
return this.file.createDir(destParent, destFolderName, false);
|
return this.file.createDir(destParent, destFolderName, true);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
||||||
const promises = [],
|
const promises = [],
|
||||||
|
|
|
@ -1017,7 +1017,7 @@ export class CoreFileProvider {
|
||||||
return this.zip.unzip(fileEntry.toURL(), destFolder, onProgress);
|
return this.zip.unzip(fileEntry.toURL(), destFolder, onProgress);
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
return Promise.reject(null);
|
return Promise.reject('Unzip failed.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue