From 62c012c05c8d998170989fe8a082eac36a27f9fe Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 3 Jul 2012 18:00:12 +0200 Subject: [PATCH] a better fix for IDEA-88207 Attempt to reopen ipr-based project is rejected with "does not exist" error message --- .../src/com/intellij/ide/ReopenProjectAction.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/ReopenProjectAction.java b/platform/platform-impl/src/com/intellij/ide/ReopenProjectAction.java index e7bcb21f92d9..ae7843be60f6 100644 --- a/platform/platform-impl/src/com/intellij/ide/ReopenProjectAction.java +++ b/platform/platform-impl/src/com/intellij/ide/ReopenProjectAction.java @@ -25,6 +25,7 @@ import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.io.FileUtil; import java.awt.event.InputEvent; +import java.io.File; /** * @author yole @@ -50,8 +51,8 @@ public class ReopenProjectAction extends AnAction implements DumbAware { final int modifiers = e.getModifiers(); final boolean forceOpenInNewFrame = (modifiers & InputEvent.CTRL_MASK) != 0 || (modifiers & InputEvent.SHIFT_MASK) != 0; Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext()); - if (!RecentProjectsManagerBase.isValidProjectPath(myProjectPath)) { - Messages.showErrorDialog(project, "The directory " + FileUtil.toSystemDependentName(myProjectPath) + " does not exist.\n" + + if (!new File(myProjectPath).exists()) { + Messages.showErrorDialog(project, "The path " + FileUtil.toSystemDependentName(myProjectPath) + " does not exist.\n" + "If it is on a removable or network drive, please make sure that the drive is connected.", "Reopen Project"); return;