Fix failed CliTest for Windows
This commit is contained in:
+8
-1
@@ -56,6 +56,7 @@ import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.Collection;
|
||||
@@ -406,7 +407,13 @@ public class KotlinToJVMBytecodeCompiler {
|
||||
|
||||
if(loader instanceof URLClassLoader) {
|
||||
for (URL url : ((URLClassLoader) loader).getURLs()) {
|
||||
String urlFile = url.getFile();
|
||||
String urlFile;
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user