From 5c39bda748a5043b0641069cfbfe698b06f83a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 27 Nov 2018 09:34:00 +0100 Subject: [PATCH] MOBILE-2744 file: Avoid having null basePath --- src/providers/file.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/providers/file.ts b/src/providers/file.ts index 6b7469f32..00378507b 100644 --- a/src/providers/file.ts +++ b/src/providers/file.ts @@ -79,9 +79,9 @@ export class CoreFileProvider { return this.platform.ready().then(() => { if (this.platform.is('android')) { - this.basePath = this.file.externalApplicationStorageDirectory; + this.basePath = this.file.externalApplicationStorageDirectory || this.basePath; } else if (this.platform.is('ios')) { - this.basePath = this.file.documentsDirectory; + this.basePath = this.file.documentsDirectory || this.basePath; } else if (!this.isAvailable() || this.basePath === '') { this.logger.error('Error getting device OS.'); @@ -453,7 +453,7 @@ export class CoreFileProvider { }; setTimeout(() => { if (!hasStarted) { - reject(); + reject('Upload cannot start.'); } }, 3000);