MOBILE-3213 scorm: Fix unzip using emulator

main
Pau Ferrer Ocaña 2019-12-16 15:37:54 +01:00
parent 75ea013503
commit 5fa8f61d9d
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ export class ZipMock extends Zip {
const destParent = destination.substring(0, source.lastIndexOf('/')),
destFolderName = destination.substr(source.lastIndexOf('/') + 1);
return this.file.createDir(destParent, destFolderName, false);
return this.file.createDir(destParent, destFolderName, true);
}).then(() => {
const promises = [],

View File

@ -1017,7 +1017,7 @@ export class CoreFileProvider {
return this.zip.unzip(fileEntry.toURL(), destFolder, onProgress);
}).then((result) => {
if (result == -1) {
return Promise.reject(null);
return Promise.reject('Unzip failed.');
}
});
}