diff --git a/platform/testFramework/junit5/eel/src/impl/nio/EelUnitTestFileSystem.kt b/platform/testFramework/junit5/eel/src/impl/nio/EelUnitTestFileSystem.kt index 660eeb41b391..9d2723c7464c 100644 --- a/platform/testFramework/junit5/eel/src/impl/nio/EelUnitTestFileSystem.kt +++ b/platform/testFramework/junit5/eel/src/impl/nio/EelUnitTestFileSystem.kt @@ -55,7 +55,9 @@ internal class EelUnitTestFileSystem(val provider: FileSystemProvider, val os: E else if (first.startsWith(fakeLocalRoot.replace(File.separatorChar, '/'))) { first.substringAfter(fakeLocalRoot.replace(File.separatorChar, '/')) } - else { + else if (first.replace(File.separatorChar, '/').startsWith('/')) { + first + } else { null } if (remaining != null) {