Handle URL from class loader with unescaped chars too
This commit is contained in:
+11
-7
@@ -42,9 +42,9 @@ import org.jetbrains.jet.lang.parsing.JetScriptDefinitionProvider;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
||||
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
|
||||
import org.jetbrains.jet.lang.resolve.ScriptNameUtil;
|
||||
import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAbi;
|
||||
import org.jetbrains.jet.lang.resolve.ScriptNameUtil;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.plugin.JetMainDetector;
|
||||
@@ -407,13 +407,17 @@ public class KotlinToJVMBytecodeCompiler {
|
||||
|
||||
if(loader instanceof URLClassLoader) {
|
||||
for (URL url : ((URLClassLoader) loader).getURLs()) {
|
||||
String urlFile;
|
||||
try {
|
||||
urlFile = url.toURI().getPath();
|
||||
}
|
||||
catch (URISyntaxException e) {
|
||||
throw ExceptionUtils.rethrow(e);
|
||||
String urlFile = url.getFile();
|
||||
|
||||
if (urlFile.contains("%")) {
|
||||
try {
|
||||
urlFile = url.toURI().getPath();
|
||||
}
|
||||
catch (URISyntaxException e) {
|
||||
throw ExceptionUtils.rethrow(e);
|
||||
}
|
||||
}
|
||||
|
||||
File file = new File(urlFile);
|
||||
if(file.exists() && (file.isDirectory() || file.getName().endsWith(".jar"))) {
|
||||
files.add(file);
|
||||
|
||||
@@ -186,6 +186,7 @@
|
||||
<unzip src="dependencies/download/@{build.zip}" dest="ideaSDK"/>
|
||||
|
||||
<!-- Copy win files to the place where idea expect them to see. See com.intellij.openapi.util.io.win32.IdeaWin32 -->
|
||||
<!-- TODO: Remove when build will depend on IDEA from 02.08.2012 or later -->
|
||||
<mkdir dir="ideaSDK/bin/win"/>
|
||||
<copy todir="ideaSDK/bin/win">
|
||||
<filelist dir="ideaSDK/bin" files="IdeaWin32.dll,IdeaWin64.dll"/>
|
||||
|
||||
Reference in New Issue
Block a user