Skip to content

Commit a088820

Browse files
Merge main into feature/q-inlinechat
2 parents 98ba5c3 + 32b4a8a commit a088820

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
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" : "Fix(Amazon Q Code Transformation): always show user latest/correct transformation results"
4+
}

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CodeModernizerArtifact.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import software.aws.toolkits.core.utils.warn
1919
import software.aws.toolkits.jetbrains.services.codemodernizer.TransformationSummary
2020
import software.aws.toolkits.jetbrains.services.codemodernizer.utils.unzipFile
2121
import java.io.File
22+
import java.util.UUID
2223
import kotlin.io.path.ExperimentalPathApi
2324
import kotlin.io.path.Path
2425
import kotlin.io.path.isDirectory
@@ -39,7 +40,7 @@ open class CodeModernizerArtifact(
3940

4041
companion object {
4142
private const val MAX_SUPPORTED_VERSION = 1.0
42-
private val tempDir = createTempDirectory("codeTransformArtifacts", null)
43+
private var tempDir = createTempDirectory("codeTransformArtifacts", null)
4344
private const val MANIFEST_FILE_NAME = "manifest.json"
4445
private const val SUMMARY_FILE_NAME = "summary.md"
4546
private const val METRICS_FILE_NAME = "metrics.json"
@@ -52,6 +53,7 @@ open class CodeModernizerArtifact(
5253
* If anything goes wrong during this process an exception is thrown.
5354
*/
5455
fun create(zipPath: String): CodeModernizerArtifact {
56+
tempDir = createTempDirectory("codeTransformArtifacts-", UUID.randomUUID().toString())
5557
val path = Path(zipPath)
5658
if (path.exists()) {
5759
if (!unzipFile(path, tempDir.toPath())) {

0 commit comments

Comments
 (0)