Commit c4664aa6 authored by Vasily Romanikhin's avatar Vasily Romanikhin
Browse files

Merge branch 'master' of git.labs.intellij.net:idea/community

parents ae39f0bd e3b9ca76
Showing with 5 additions and 13 deletions
+5 -13
......@@ -57,7 +57,10 @@ import org.jetbrains.annotations.TestOnly;
import java.io.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.*;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
......@@ -677,7 +680,7 @@ public class PluginManagerCore {
@NotNull JDOMXIncluder.PathResolver pathResolver,
@NotNull LoadingContext context) {
try {
URL jarURL = URLUtil.getJarEntryURL(file, getNormalizedPathInJar(fileName));
URL jarURL = URLUtil.getJarEntryURL(file, FileUtil.toCanonicalPath(META_INF + '/' + fileName, '/'));
ZipFile zipFile = context.myOpenedFiles.get(file);
if (zipFile == null) {
......@@ -704,17 +707,6 @@ public class PluginManagerCore {
return null;
}
@NotNull
private static String getNormalizedPathInJar(@NotNull String pathInJar) {
String absolutePathInJar = META_INF + '/' + pathInJar;
try {
return new URI(absolutePathInJar).normalize().getPath();
}
catch (URISyntaxException ignored) {
}
return absolutePathInJar;
}
@Nullable
public static IdeaPluginDescriptorImpl loadDescriptor(@NotNull final File file, @NotNull String fileName) {
try (LoadingContext context = new LoadingContext()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment