Fix absolute paths for data root. Allow setting data root via console args.

This commit is contained in:
Cohee
2024-04-12 19:53:46 +03:00
parent 3e1ff9bc25
commit dcbeab0aef
6 changed files with 112 additions and 56 deletions

View File

@ -122,7 +122,7 @@ async function seedContentForUser(contentIndex, directories, forceCategories) {
}
const basePath = path.parse(contentItem.filename).base;
const targetPath = path.join(process.cwd(), contentTarget, basePath);
const targetPath = path.join(contentTarget, basePath);
if (fs.existsSync(targetPath)) {
console.log(`Content file ${contentItem.filename} already exists in ${contentTarget}`);