From 832ec51707b5d9eeb9a5ab33ee62161c4eef99ea Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Thu, 27 Jul 2017 03:08:34 +0300 Subject: [PATCH] convert lastPath to system-dependent before checking --- .../src/com/intellij/ide/RecentProjectsManagerBase.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java b/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java index 4035cb9965a4..1691cd71f7ef 100644 --- a/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java +++ b/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java @@ -177,12 +177,10 @@ public abstract class RecentProjectsManagerBase extends RecentProjectsManager im public void loadState(final State state) { state.makePathsSystemIndependent(); removeDuplicates(state); - if (state.lastPath != null && !new File(state.lastPath).exists()) { - state.lastPath = null; - } if (state.lastPath != null) { - File lastFile = new File(state.lastPath); - if (lastFile.isDirectory() && !new File(lastFile, Project.DIRECTORY_STORE_FOLDER).exists()) { + File lastFile = new File(PathUtil.toSystemDependentName(state.lastPath)); + if (!lastFile.exists() || + lastFile.isDirectory() && !new File(lastFile, Project.DIRECTORY_STORE_FOLDER).exists()) { state.lastPath = null; } }