mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-136072 (fixed for Windows)
This commit is contained in:
@@ -15,10 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.application;
|
||||
|
||||
import com.intellij.openapi.util.NamedJDOMExternalizable;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.SystemInfoRt;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.io.URLUtil;
|
||||
@@ -399,7 +396,8 @@ public class PathManager {
|
||||
value = "";
|
||||
}
|
||||
|
||||
s = m.replaceAll(value);
|
||||
s = StringUtil.replace(s, m.group(), value);
|
||||
m = PROPERTY_REF.matcher(s);
|
||||
}
|
||||
|
||||
return s;
|
||||
|
||||
@@ -48,9 +48,10 @@ public class PathManagerTest {
|
||||
|
||||
String home = System.clearProperty(PathManager.PROPERTY_HOME_PATH);
|
||||
try {
|
||||
assertEquals(PathManager.getHomePath() + "/build.txt", PathManager.substituteVars("${idea.home.path}/build.txt"));
|
||||
assertEquals(PathManager.getHomePath() + "/build.txt", PathManager.substituteVars("${idea.home}/build.txt"));
|
||||
assertEquals("/opt/idea/build.txt", PathManager.substituteVars("${idea.home.path}/build.txt", "/opt/idea"));
|
||||
assertEquals(PathManager.getHomePath() + "\\build.txt", PathManager.substituteVars("${idea.home.path}\\build.txt"));
|
||||
assertEquals("/opt/idea/build.txt", PathManager.substituteVars("${idea.home}/build.txt", "/opt/idea"));
|
||||
assertEquals("C:\\opt\\idea\\build.txt", PathManager.substituteVars("${idea.home.path}\\build.txt", "C:\\opt\\idea"));
|
||||
}
|
||||
finally {
|
||||
if (home != null) {
|
||||
|
||||
Reference in New Issue
Block a user