diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/impl/TemporaryDirectoryManagerImpl.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/impl/TemporaryDirectoryManagerImpl.kt index 5827b5e2a7d..56ebcc70ed8 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/impl/TemporaryDirectoryManagerImpl.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/impl/TemporaryDirectoryManagerImpl.kt @@ -19,7 +19,9 @@ class TemporaryDirectoryManagerImpl(testServices: TestServices) : TemporaryDirec val testInfo = testServices.testInfo val className = testInfo.className val methodName = testInfo.methodName - if (!onWindows) return@run KtTestUtil.tmpDirForTest(className, methodName) + if (!onWindows && className.length + methodName.length < 255) { + return@run KtTestUtil.tmpDirForTest(className, methodName) + } // This code will simplify directory name for windows. This is needed because there can occur errors due to long name val lastDot = className.lastIndexOf('.')