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>
This commit is contained in:
copilot-swe-agent[bot] 2025-10-23 17:48:18 +00:00
parent 4be84b59bc
commit 6d259bb5bd

View File

@ -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 })