Made compiler aware of multiple alt-header paths.

This commit is contained in:
Evgeny Gerashchenko
2012-05-15 00:16:44 +04:00
parent 554280a1b3
commit 4ab2588cbd
7 changed files with 62 additions and 25 deletions
@@ -20,6 +20,7 @@
package org.jetbrains.jet.utils;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
import org.jetbrains.annotations.NotNull;
@@ -106,6 +107,6 @@ public class PathUtil {
if (!file.exists() || !file.isFile()) {
throw new IllegalStateException("file must exist and be regular to be converted to virtual file: " + file);
}
return VirtualFileManager.getInstance().findFileByUrl("jar://" + file.getPath() + "!/");
return VirtualFileManager.getInstance().findFileByUrl("jar://" + FileUtil.toSystemIndependentName(file.getAbsolutePath()) + "!/");
}
}