Skip to content

Commit 8f46f71

Browse files
committed
Merge branch 'main' into epoch-upgrade
2 parents 7bb72f3 + 3e08a46 commit 8f46f71

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎gsd-opencode/bin/dm/src/services/file-ops.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,11 @@ export class FileOperations {
602602
// Cross-device move needed
603603
this.logger.debug('Cross-device move detected, using copy+delete');
604604
await this._crossDeviceMove(tempDir, targetDir);
605-
} else if (error.code === 'ENOTEMPTY' || error.code === 'EEXIST') {
605+
} else if (error.code === 'ENOTEMPTY' || error.code === 'EEXIST' || error.code === 'EPERM') {
606606
// Target exists with other files - MERGE instead of replace
607607
// This preserves existing opencode configuration
608+
// NOTE: On Windows, fs.rename throws EPERM instead of ENOTEMPTY/EEXIST
609+
// when target directory exists. Fixed: 2026-02-26
608610
this.logger.debug('Target exists with existing files, merging contents');
609611
await this._mergeDirectories(tempDir, targetDir);
610612
// Clean up temp directory after merge

0 commit comments

Comments
 (0)