From 0c90c6040fa4f6b3c03ef97c53d2f9acc3a5da57 Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Thu, 10 Aug 2017 17:49:25 +0300 Subject: [PATCH] Convert path to system independent name to support Windows Different separator is used on Windows and which breaks getRelativePath --- .../intellij/testFramework/propertyBased/MadTestingUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/testFramework/testSrc/com/intellij/testFramework/propertyBased/MadTestingUtil.java b/platform/testFramework/testSrc/com/intellij/testFramework/propertyBased/MadTestingUtil.java index af2e9fcb6758..e1e713173dcf 100644 --- a/platform/testFramework/testSrc/com/intellij/testFramework/propertyBased/MadTestingUtil.java +++ b/platform/testFramework/testSrc/com/intellij/testFramework/propertyBased/MadTestingUtil.java @@ -231,7 +231,7 @@ public class MadTestingUtil { @NotNull private static VirtualFile copyFileToProject(File ioFile, CodeInsightTestFixture fixture, String rootPath) { try { - String path = FileUtil.getRelativePath(FileUtil.toCanonicalPath(rootPath), ioFile.getPath(), '/'); + String path = FileUtil.getRelativePath(FileUtil.toCanonicalPath(rootPath), FileUtil.toSystemIndependentName(ioFile.getPath()), '/'); assert path != null; VirtualFile existing = fixture.findFileInTempDir(path); if (existing != null) {