Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "/review: Invalid file path characters caused some detections to be skipped on Windows"
}
3 changes: 2 additions & 1 deletion packages/core/src/codewhisperer/util/zipUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { FeatureUseCase } from '../models/constants'
import { ChildProcess, ChildProcessOptions } from '../../shared/utilities/processUtils'
import { ProjectZipError } from '../../amazonqTest/error'
import { removeAnsi } from '../../shared/utilities/textUtilities'
import { normalize } from '../../shared/utilities/pathUtils'

export interface ZipMetadata {
rootDir: string
Expand Down Expand Up @@ -122,7 +123,7 @@ export class ZipUtil {
zip.addFile(zipEntryPath, Buffer.from(content, 'utf-8'))

if (scope === CodeWhispererConstants.CodeAnalysisScope.FILE_ON_DEMAND) {
const gitDiffContent = `+++ b/${path.normalize(zipEntryPath)}` // Sending file path in payload for LLM code review
const gitDiffContent = `+++ b/${normalize(zipEntryPath)}` // Sending file path in payload for LLM code review
zip.addFile(ZipConstants.codeDiffFilePath, Buffer.from(gitDiffContent, 'utf-8'))
}
} else {
Expand Down
Loading