Convert path to system independent name to support Windows

Different separator is used on Windows and which breaks
getRelativePath
This commit is contained in:
Ilya.Kazakevich
2017-08-10 17:51:07 +03:00
parent 7f6c078a6a
commit 0c90c6040f
@@ -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) {