Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

fix(windows): keep the rename guard satisfied in the in-place runtime update

velixio19ed0597ee42
diff --git a/electron/src/main/runtime-project.ts b/electron/src/main/runtime-project.ts
index f60f49f65..8172cef5e 100644
--- a/electron/src/main/runtime-project.ts
+++ b/electron/src/main/runtime-project.ts
@@ -490,7 +490,7 @@ async function mirrorInPlace(source: string, target: string): Promise<void> {
export async function stageRuntimeSources(
bundle: string,
project: string,
- rename: typeof renameWithRetry = renameWithRetry,
+ renameDirectory: typeof renameWithRetry = renameWithRetry,
): Promise<void> {
await mkdir(project, { recursive: true });
for (const name of SOURCES) {
@@ -506,15 +506,15 @@ export async function stageRuntimeSources(
try {
let moved = false;
try {
- await rename(target, previous, DIRECTORY_RENAME);
+ await renameDirectory(target, previous, DIRECTORY_RENAME);
moved = true;
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error;
}
try {
- await rename(pending, target, DIRECTORY_RENAME);
+ await renameDirectory(pending, target, DIRECTORY_RENAME);
} catch (error) {
- if (moved) await rename(previous, target, DIRECTORY_RENAME);
+ if (moved) await renameDirectory(previous, target, DIRECTORY_RENAME);
throw error;
}
} catch (error) {