MOBILE-2744 file: Avoid having null basePath
parent
b39cbd338f
commit
5c39bda748
|
@ -79,9 +79,9 @@ export class CoreFileProvider {
|
||||||
return this.platform.ready().then(() => {
|
return this.platform.ready().then(() => {
|
||||||
|
|
||||||
if (this.platform.is('android')) {
|
if (this.platform.is('android')) {
|
||||||
this.basePath = this.file.externalApplicationStorageDirectory;
|
this.basePath = this.file.externalApplicationStorageDirectory || this.basePath;
|
||||||
} else if (this.platform.is('ios')) {
|
} else if (this.platform.is('ios')) {
|
||||||
this.basePath = this.file.documentsDirectory;
|
this.basePath = this.file.documentsDirectory || this.basePath;
|
||||||
} else if (!this.isAvailable() || this.basePath === '') {
|
} else if (!this.isAvailable() || this.basePath === '') {
|
||||||
this.logger.error('Error getting device OS.');
|
this.logger.error('Error getting device OS.');
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ export class CoreFileProvider {
|
||||||
};
|
};
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!hasStarted) {
|
if (!hasStarted) {
|
||||||
reject();
|
reject('Upload cannot start.');
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue