fix(core): update
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user