From c1bcf9645e1a0a14355aaadac0a3447b04a4d2d8 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Thu, 14 Oct 2010 15:55:38 +0400 Subject: [PATCH] do not include project name in location hash for directory-based projects --- .../src/com/intellij/openapi/project/impl/ProjectImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java index a896f4677b59..6ae1eefe8a29 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java @@ -27,6 +27,7 @@ import com.intellij.openapi.application.PathMacros; import com.intellij.openapi.application.ex.ApplicationEx; import com.intellij.openapi.application.ex.ApplicationManagerEx; import com.intellij.openapi.components.ProjectComponent; +import com.intellij.openapi.components.StorageScheme; import com.intellij.openapi.components.TrackingPathMacroSubstitutor; import com.intellij.openapi.components.impl.ComponentManagerImpl; import com.intellij.openapi.components.impl.ProjectPathMacroManager; @@ -211,7 +212,8 @@ public class ProjectImpl extends ComponentManagerImpl implements ProjectEx { String str = getPresentableUrl(); if (str == null) str = getName(); - return getName() + Integer.toHexString(str.hashCode()); + final String prefix = getStateStore().getStorageScheme() == StorageScheme.DIRECTORY_BASED? "" : getName(); + return prefix + Integer.toHexString(str.hashCode()); } @Nullable