Skip to content

Commit 1f1cf00

Browse files
committed
fix: allow option to disable posix path
1 parent 9f79ef3 commit 1f1cf00

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/core/src/amazonq/util/zipProjectUtil.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface ZippedWorkspaceResult {
1515

1616
interface ZipProjectOptions {
1717
includeProjectName?: boolean
18+
nonPosixPath?: boolean
1819
}
1920

2021
interface ZipProjectCustomizations {
@@ -54,7 +55,7 @@ export async function addToZip(
5455
const zipFilePath = options?.includeProjectName
5556
? path.join(path.basename(file.workspaceFolder.uri.fsPath), file.zipFilePath)
5657
: file.zipFilePath
57-
const posixPath = zipFilePath.split(path.sep).join(path.posix.sep)
58+
const posixPath = options?.nonPosixPath ? zipFilePath : zipFilePath.split(path.sep).join(path.posix.sep)
5859

5960
try {
6061
// filepath will be out-of-sync for files with unsaved changes.

packages/core/src/codewhisperer/util/zipUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ export class ZipUtil {
463463
checkForError,
464464
computeSideEffects,
465465
},
466-
{ includeProjectName: true }
466+
{ includeProjectName: true, nonPosixPath: true }
467467
)
468468
}
469469

0 commit comments

Comments
 (0)