From 6d259bb5bdb6818155049f2c9e30c0afd06159a1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Oct 2025 17:48:18 +0000 Subject: [PATCH] Address code review feedback - improve comment clarity Updated comments to be more precise about the copy+delete approach Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> --- src/main/services/FileStorage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/services/FileStorage.ts b/src/main/services/FileStorage.ts index 753eeb663f..b25b07b096 100644 --- a/src/main/services/FileStorage.ts +++ b/src/main/services/FileStorage.ts @@ -326,7 +326,7 @@ class FileStorage { logger.debug(`File moved successfully: ${filePath} to ${newPath}`) } catch (renameError: any) { // If rename fails (e.g., cross-filesystem move), use copy+delete approach - // This ensures the file is actually moved, not just copied + // This ensures the original file is removed after copying, completing the move operation logger.debug(`Rename failed, using copy+delete approach: ${renameError.message}`) await fs.promises.copyFile(filePath, newPath) await fs.promises.unlink(filePath) @@ -356,7 +356,7 @@ class FileStorage { logger.debug(`Directory moved successfully: ${dirPath} to ${newDirPath}`) } catch (renameError: any) { // If rename fails (e.g., cross-filesystem move), use copy+delete approach - // This ensures the directory is actually moved, not just copied + // This ensures the original directory is removed after copying, completing the move operation logger.debug(`Rename failed, using copy+delete approach: ${renameError.message}`) await this.copyDirectory(dirPath, newDirPath) await fs.promises.rm(dirPath, { recursive: true, force: true })