gradle.kts: remove LastModifiedFiles fs data when removing gradle root

This commit is contained in:
Sergey Rostov
2020-05-07 15:09:29 +03:00
parent f196085e41
commit 6c3a6f8bc2
@@ -316,11 +316,6 @@ class GradleBuildRootsManager(val project: Project) : ScriptingSupport.Provider(
}
}
private fun removeData(rootPath: String) {
val buildRoot = LocalFileSystem.getInstance().findFileByPath(rootPath)
if (buildRoot != null) GradleBuildRootDataSerializer.remove(buildRoot)
}
private fun loadLinkedRoot(settings: GradleProjectSettings) =
tryLoadFromFsCache(settings) ?: createOtherLinkedRoot(settings)
@@ -370,6 +365,14 @@ class GradleBuildRootsManager(val project: Project) : ScriptingSupport.Provider(
updateNotifications(rootPath)
}
private fun removeData(rootPath: String) {
val buildRoot = LocalFileSystem.getInstance().findFileByPath(rootPath)
if (buildRoot != null) {
GradleBuildRootDataSerializer.remove(buildRoot)
LastModifiedFiles.remove(buildRoot)
}
}
private fun updateNotifications(dir1: String) {
if (!project.isOpen) return