فهرست منبع

fix issue with virtual file refreshment and reload from disk automatically

windchargerj 1 سال پیش
والد
کامیت
188082b8b4
1فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 8 1
      src/main/kotlin/io/xmake/utils/execute/Sync.kt

+ 8 - 1
src/main/kotlin/io/xmake/utils/execute/Sync.kt

@@ -8,6 +8,7 @@ import com.intellij.execution.wsl.target.WslTargetEnvironment
 import com.intellij.execution.wsl.target.WslTargetEnvironmentConfiguration
 import com.intellij.execution.wsl.target.WslTargetEnvironmentRequest
 import com.intellij.openapi.application.EDT
+import com.intellij.openapi.application.invokeLater
 import com.intellij.openapi.application.runWriteAction
 import com.intellij.openapi.diagnostic.fileLogger
 import com.intellij.openapi.extensions.ExtensionPointName
@@ -146,7 +147,13 @@ fun transferFolderByToolkit(
 ) {
 
     when (toolkit.host.type) {
-        ToolkitHostType.LOCAL -> {}
+        ToolkitHostType.LOCAL -> {
+            invokeLater {
+                runWriteAction {
+                    VirtualFileManager.getInstance().syncRefresh()
+                }
+            }
+        }
         ToolkitHostType.WSL -> {
             syncProjectByWslSync(
                 scope,