File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
amazonq/.changes/next-release
core/src/amazonqFeatureDev/util Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "type" : " Bug Fix" ,
3+ "description" : " Amazon Q /dev: Fix issue when files are deleted while preparing context"
4+ }
Original file line number Diff line number Diff line change @@ -58,7 +58,17 @@ export async function prepareRepoData(
5858 totalBytes += fileSize
5959
6060 const zipFolderPath = path . dirname ( file . zipFilePath )
61- zip . addLocalFile ( file . fileUri . fsPath , zipFolderPath )
61+
62+ try {
63+ zip . addLocalFile ( file . fileUri . fsPath , zipFolderPath )
64+ } catch ( error ) {
65+ if ( error instanceof Error && error . message . includes ( 'File not found' ) ) {
66+ // No-op: Skip if file does not exist
67+ // Reference: https://github.com/cthackers/adm-zip/blob/1cd32f7e0ad3c540142a76609bb538a5cda2292f/adm-zip.js#L296-L321
68+ continue
69+ }
70+ throw error
71+ }
6272 }
6373
6474 const iterator = ignoredExtensionMap . entries ( )
You can’t perform that action at this time.
0 commit comments