fix(core): update

This commit is contained in:
Philipp Kunz 2019-10-20 01:19:34 +02:00
parent 1b49699663
commit 789ff96cf0

View File

@ -67,9 +67,12 @@ export class Directory {
if(!bucketItem.name) { if(!bucketItem.name) {
return; return;
} }
const subtractedPath = bucketItem.name.replace(this.getBasePath(), ''); let subtractedPath = bucketItem.name.replace(this.getBasePath(), '');
if (subtractedPath.startsWith('/')) {
subtractedPath = subtractedPath.substr(1);
}
if (!subtractedPath.includes('/')) { if (!subtractedPath.includes('/')) {
fileArray.push(new File(this, bucketItem.name)); fileArray.push(new File(this, subtractedPath));
} }
}, },