Skip to content

Commit 12d477b

Browse files
committed
refreshing files
1 parent f225ef4 commit 12d477b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ import java.nio.file.Paths
5959
import java.util.UUID
6060
import java.util.concurrent.CompletableFuture
6161
import java.util.concurrent.TimeUnit
62-
import kotlin.io.path.Path
6362

6463
/**
6564
* Concrete implementation of [AmazonQLanguageClient] to handle messages sent from server
@@ -375,18 +374,19 @@ class AmazonQLanguageClientImpl(private val project: Project) : AmazonQLanguageC
375374
}
376375

377376
private fun refreshVfs(path: String) {
378-
if (Path(path).startsWith(userHomePath)) return
377+
val currPath = Paths.get(path)
378+
if (currPath.startsWith(localHistoryPath)) return
379379
try {
380380
ApplicationManager.getApplication().invokeLater {
381-
VfsUtil.markDirtyAndRefresh(false, true, true, Path(path).toFile())
381+
VfsUtil.markDirtyAndRefresh(false, true, true, currPath.toFile())
382382
}
383383
} catch (e: Exception) {
384-
LOG.warn { "Could not refresh file" }
384+
LOG.warn(e) { "Could not refresh file" }
385385
}
386386
}
387387

388388
companion object {
389-
val userHomePath = Paths.get(
389+
val localHistoryPath = Paths.get(
390390
UserHomeDirectoryUtils.userHomeDirectory(),
391391
".aws",
392392
"amazonq",

0 commit comments

Comments
 (0)