Fix no sanitize check on wi create

This commit is contained in:
Wolfsblvt 2024-05-23 00:39:49 +02:00
parent ab8c67ede6
commit 92cb70213a

View File

@ -2631,7 +2631,9 @@ async function createNewWorldInfo(worldName, { interactive = false } = {}) {
return false;
}
const allowed = await checkOverwriteExistingData('World Info', world_names, worldName, { interactive: interactive, actionName: 'Create', deleteAction: (existingName) => deleteWorldInfo(existingName) });
const sanitizedWorldName = await getSanitizedFilename(worldName);
const allowed = await checkOverwriteExistingData('World Info', world_names, sanitizedWorldName, { interactive: interactive, actionName: 'Create', deleteAction: (existingName) => deleteWorldInfo(existingName) });
if (!allowed) {
return false;
}