diff --git a/web/screens/Settings/Advanced/DataFolder/index.tsx b/web/screens/Settings/Advanced/DataFolder/index.tsx index fe590bfaac..f9c2f440aa 100644 --- a/web/screens/Settings/Advanced/DataFolder/index.tsx +++ b/web/screens/Settings/Advanced/DataFolder/index.tsx @@ -83,7 +83,11 @@ const DataFolder = () => { await window.core?.api?.getAppConfigurations() const currentJanDataFolder = appConfiguration.data_folder appConfiguration.data_folder = destinationPath - await fs.syncFile(currentJanDataFolder, destinationPath) + const { _, err } = await fs.syncFile( + currentJanDataFolder, + destinationPath + ) + if (err) throw err await window.core?.api?.updateAppConfiguration(appConfiguration) console.debug( `File sync finished from ${currentJanDataFolder} to ${destinationPath}` @@ -94,7 +98,7 @@ const DataFolder = () => { }, 1200) await window.core?.api?.relaunch() } catch (e) { - console.error(`Error: ${e}`) + console.error(e) setShowLoader(false) setShowChangeFolderError(true) }