Skip to content

Commit e4b3476

Browse files
authored
Merge branch 'main' into finks/default-custom
2 parents 4accc9e + 05d7054 commit e4b3476

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Amazon Q /dev: Fix issue when files are deleted while preparing context"
4+
}

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/NotificationStateUtils.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
package software.aws.toolkits.jetbrains.core.notifications
55

66
import com.intellij.openapi.components.PersistentStateComponent
7-
import com.intellij.openapi.components.RoamingType
87
import com.intellij.openapi.components.Service
98
import com.intellij.openapi.components.State
109
import com.intellij.openapi.components.Storage
1110
import com.intellij.openapi.components.service
1211
import software.aws.toolkits.core.utils.ETagProvider
1312

1413
@Service
15-
@State(name = "notificationDismissals", storages = [Storage("aws.xml", roamingType = RoamingType.DISABLED)])
14+
@State(name = "notificationDismissals", storages = [Storage("aws.xml")])
1615
class NotificationDismissalState : PersistentStateComponent<NotificationDismissalConfiguration> {
1716
private val state = NotificationDismissalConfiguration()
1817

@@ -41,7 +40,7 @@ data class NotificationDismissalConfiguration(
4140
)
4241

4342
@Service
44-
@State(name = "notificationEtag", storages = [Storage("aws.xml", roamingType = RoamingType.DISABLED)])
43+
@State(name = "notificationEtag", storages = [Storage("aws.xml")])
4544
class NotificationEtagState : PersistentStateComponent<NotificationEtagConfiguration>, ETagProvider {
4645
private val state = NotificationEtagConfiguration()
4746

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/FeatureDevSessionContext.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,12 @@ class FeatureDevSessionContext(val project: Project, val maxProjectSizeBytes: Lo
189189

190190
createTemporaryZipFileAsync { zipOutput ->
191191
filesToIncludeFlow.collect { file ->
192-
val relativePath = Path(file.path).relativeTo(projectRoot.toNioPath())
193-
zipOutput.putNextEntry(relativePath.toString(), Path(file.path))
192+
try {
193+
val relativePath = Path(file.path).relativeTo(projectRoot.toNioPath())
194+
zipOutput.putNextEntry(relativePath.toString(), Path(file.path))
195+
} catch (e: NoSuchFileException) {
196+
// Noop: Skip if file was deleted
197+
}
194198
}
195199
}
196200
}.toFile()

0 commit comments

Comments
 (0)