fix(core): update

This commit is contained in:
2020-10-12 00:23:25 +00:00
parent 365eea59bd
commit 77e69171e2
4 changed files with 8070 additions and 1939 deletions

View File

@ -43,12 +43,20 @@ export class Directory {
const parentDirectories = this.getParentDirectories();
let basePath = '';
for (const parentDir of parentDirectories) {
if (parentDir.name === '') {
if (!parentDir.name && !basePath) {
basePath = this.name + '/';
continue;
}
basePath = parentDir.name + '/' + this.name;
if (parentDir.name && !basePath) {
basePath = parentDir.name + '/' + this.name + '/';
continue;
}
if (parentDir.name && basePath) {
basePath = parentDir.name + '/' + basePath;
continue;
}
}
console.log(basePath);
return basePath;
}