From 5fa8f61d9d8bdcb82d7d1bcb3e66ccb2114155bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 16 Dec 2019 15:37:54 +0100 Subject: [PATCH] MOBILE-3213 scorm: Fix unzip using emulator --- src/core/emulator/providers/zip.ts | 2 +- src/providers/file.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/emulator/providers/zip.ts b/src/core/emulator/providers/zip.ts index 3170023ad..1c3af04a7 100644 --- a/src/core/emulator/providers/zip.ts +++ b/src/core/emulator/providers/zip.ts @@ -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 = [], diff --git a/src/providers/file.ts b/src/providers/file.ts index 9dedaedbf..07d1628f5 100644 --- a/src/providers/file.ts +++ b/src/providers/file.ts @@ -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.'); } }); }