add package path to paths
This commit is contained in:
parent
5a3aa553cd
commit
eb8eb3fa84
|
@ -251,6 +251,7 @@ export default class {
|
|||
}
|
||||
|
||||
const contentPath = packed ? dirName.contentPath : path.join(this.contentPath, dirName);
|
||||
const packagePath = packed ? dirName.packagePath : null;
|
||||
|
||||
await FileUtils.directoryExists(contentPath);
|
||||
|
||||
|
@ -309,7 +310,8 @@ export default class {
|
|||
const paths = {
|
||||
contentPath,
|
||||
dirName,
|
||||
mainPath
|
||||
mainPath,
|
||||
packagePath
|
||||
};
|
||||
|
||||
const content = await this.loadContent(paths, configs, readConfig.info, readConfig.main, readConfig.dependencies, readConfig.permissions, readConfig.mainExport, packed ? dirName : false);
|
||||
|
@ -352,6 +354,11 @@ export default class {
|
|||
if (!force)
|
||||
await unload;
|
||||
|
||||
if (content.packed) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
await FileUtils.recursiveDeleteDirectory(content.paths.contentPath);
|
||||
return true;
|
||||
} catch (err) {
|
||||
|
|
|
@ -113,7 +113,8 @@ export default class extends ContentManager {
|
|||
paths: {
|
||||
contentPath: paths.contentPath,
|
||||
dirName: packed ? packed.packageName : paths.dirName,
|
||||
mainPath: paths.mainPath
|
||||
mainPath: paths.mainPath,
|
||||
packagePath: paths.packagePath
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -40,7 +40,8 @@ export default class ThemeManager extends ContentManager {
|
|||
paths: {
|
||||
contentPath: paths.contentPath,
|
||||
dirName: paths.dirName,
|
||||
mainPath: paths.mainPath
|
||||
mainPath: paths.mainPath,
|
||||
packagePath: paths.packagePath
|
||||
}
|
||||
});
|
||||
if (instance.enabled) {
|
||||
|
|
Loading…
Reference in New Issue