Skip to content

Commit ab8b20e

Browse files
committed
check windows path
1 parent f0a9c4b commit ab8b20e

File tree

1 file changed

+1
-1
lines changed
  • plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/sessionconfig

1 file changed

+1
-1
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/sessionconfig/CodeScanSessionConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class CodeScanSessionConfig(
196196
files.forEach { file ->
197197
try {
198198
val relativePath = "${project.name}/${file.relativeTo(projectRoot.toNioPath())}"
199-
if (relativePath.contains("../")) {
199+
if (relativePath.contains("../") || relativePath.contains("..\\")) {
200200
CodeWhispererTelemetryService.getInstance().sendInvalidZipEvent(file, projectRoot.toNioPath(), relativePath)
201201
}
202202
LOG.debug { "Selected file for truncation: $file" }

0 commit comments

Comments
 (0)