Fixed bug when creating instance starting or ending with spaces has errors (#845)

Based on issue #808
This commit is contained in:
MrLiam2614 2023-11-16 00:39:53 +01:00 committed by GitHub
parent 6152eeefe3
commit a8eb561774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,8 @@ import { invoke } from '@tauri-apps/api/tauri'
*/
export async function create(name, gameVersion, modloader, loaderVersion, icon, noWatch) {
//Trim string name to avoid "Unable to find directory"
name = name.trim();
return await invoke('plugin:profile_create|profile_create', {
name,
gameVersion,