mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
handle macOS urls with %-escaping
This commit is contained in:
@@ -17,6 +17,7 @@ package com.intellij.util.lang;
|
||||
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.ShutDownTracker;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -394,9 +395,9 @@ public class ClassPath {
|
||||
}
|
||||
|
||||
if (ourOrder != null) {
|
||||
String jarURL = FileUtil.toSystemIndependentName(loader.getBaseURL().getFile());
|
||||
jarURL = StringUtil.trimStart(jarURL, "file:/");
|
||||
if (jarURL.startsWith(home)) {
|
||||
Pair<String, String> pair = URLUtil.splitJarUrl(loader.getBaseURL().toExternalForm());
|
||||
String jarURL = pair != null ? pair.first : null;
|
||||
if (jarURL != null && jarURL.startsWith(home)) {
|
||||
jarURL = jarURL.replaceFirst(home, "");
|
||||
jarURL = StringUtil.trimEnd(jarURL, "!/");
|
||||
ourOrder.println(url + ":" + jarURL);
|
||||
|
||||
Reference in New Issue
Block a user