add package path to paths

This commit is contained in:
Jiiks 2018-12-06 13:45:18 +02:00
parent 5a3aa553cd
commit eb8eb3fa84
3 changed files with 12 additions and 3 deletions

View File

@ -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) {

View File

@ -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
}
});

View File

@ -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) {