mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 17:52:16 +00:00
Fix install location path picker (#1557)
This commit is contained in:
@@ -87,10 +87,10 @@ onMounted(async () => {
|
|||||||
installPath.value = paths.defaultInstallPath
|
installPath.value = paths.defaultInstallPath
|
||||||
})
|
})
|
||||||
|
|
||||||
const validatePath = async () => {
|
const validatePath = async (path: string) => {
|
||||||
try {
|
try {
|
||||||
pathError.value = ''
|
pathError.value = ''
|
||||||
const validation = await electron.validateInstallPath(installPath.value)
|
const validation = await electron.validateInstallPath(path)
|
||||||
|
|
||||||
if (!validation.isValid) {
|
if (!validation.isValid) {
|
||||||
pathError.value = validation.error
|
pathError.value = validation.error
|
||||||
@@ -105,7 +105,7 @@ const browsePath = async () => {
|
|||||||
const result = await electron.showDirectoryPicker()
|
const result = await electron.showDirectoryPicker()
|
||||||
if (result) {
|
if (result) {
|
||||||
installPath.value = result
|
installPath.value = result
|
||||||
await validatePath()
|
await validatePath(result)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
pathError.value = t('install.failedToSelectDirectory')
|
pathError.value = t('install.failedToSelectDirectory')
|
||||||
|
|||||||
Reference in New Issue
Block a user