Skip to content

Commit 9c9c3b4

Browse files
author
Hamed Soleimani
committed
fix the path for windows
1 parent 0482010 commit 9c9c3b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class FeatureDevSessionContext(val project: Project, val maxProjectSizeBytes: Lo
146146
return deferredResults.any { it.await() }
147147
}
148148

149-
private fun wellKnown(file: VirtualFile): Boolean = wellKnownSourceFiles.contains(file.name)
149+
fun wellKnown(file: VirtualFile): Boolean = wellKnownSourceFiles.contains(file.name)
150150

151151
suspend fun zipFiles(projectRoot: VirtualFile): File = withContext(getCoroutineBgContext()) {
152152
val files = mutableListOf<VirtualFile>()
@@ -222,7 +222,7 @@ class FeatureDevSessionContext(val project: Project, val maxProjectSizeBytes: Lo
222222
private suspend fun createTemporaryZipFileAsync(block: suspend (FileSystem) -> Unit): Path = withContext(getCoroutineBgContext()) {
223223
// Don't use Files.createTempFile since the file must not be created for ZipFS to work
224224
val tempFilePath: Path = Paths.get(FileUtils.getTempDirectory().absolutePath, "${UUID.randomUUID()}.zip")
225-
val uri = URI.create("jar:file:$tempFilePath")
225+
val uri = URI.create("jar:${tempFilePath.toUri()}")
226226
val env = hashMapOf("create" to "true")
227227
val zipfs = FileSystems.newFileSystem(uri, env)
228228
zipfs.use {

0 commit comments

Comments
 (0)