mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
save all paths in .iml relatively except for the ones under USER_HOME (IDEA-60906)
reason: fixes the issue and I don't see any problems it could cause
This commit is contained in:
+1
-12
@@ -45,18 +45,7 @@ public class ModulePathMacroManager extends BasePathMacroManager {
|
||||
public ReplacePathToMacroMap getReplacePathMap() {
|
||||
ReplacePathToMacroMap result = super.getReplacePathMap();
|
||||
if (!myModule.isDisposed()) {
|
||||
String projectDir = ProjectPathMacroManager.getProjectDir(myModule.getProject());
|
||||
if (projectDir != null) {
|
||||
projectDir = projectDir.replace('/', File.separatorChar);
|
||||
}
|
||||
String stopAt = projectDir;
|
||||
|
||||
final String userHome = getUserHome();
|
||||
if (stopAt != null && stopAt.startsWith(userHome)) {
|
||||
stopAt = userHome;
|
||||
}
|
||||
|
||||
addFileHierarchyReplacements(result, PathMacrosImpl.MODULE_DIR_MACRO_NAME, getModuleDir(myModule.getModuleFilePath()), stopAt);
|
||||
addFileHierarchyReplacements(result, PathMacrosImpl.MODULE_DIR_MACRO_NAME, getModuleDir(myModule.getModuleFilePath()), getUserHome());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ public class BasePathMacroManager extends PathMacroManager {
|
||||
}
|
||||
|
||||
protected static String getUserHome() {
|
||||
return SystemProperties.getUserHome();
|
||||
return StringUtil.trimEnd(SystemProperties.getUserHome(), "/");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user