From 2bd78516cadc3a249e06e5ede92430d128c35fcf Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 3 Jul 2012 17:46:09 +0200 Subject: [PATCH] IDEA-88207 Attempt to reopen ipr-based project is rejected with "does not exist" error message --- .../src/com/intellij/ide/ReopenProjectAction.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/ReopenProjectAction.java b/platform/platform-impl/src/com/intellij/ide/ReopenProjectAction.java index 81d1725549c8..e7bcb21f92d9 100644 --- a/platform/platform-impl/src/com/intellij/ide/ReopenProjectAction.java +++ b/platform/platform-impl/src/com/intellij/ide/ReopenProjectAction.java @@ -25,7 +25,6 @@ import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.io.FileUtil; import java.awt.event.InputEvent; -import java.io.File; /** * @author yole @@ -51,8 +50,7 @@ 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()); - File file = new File(myProjectPath); - if (!file.exists() || !file.isDirectory()) { + if (!RecentProjectsManagerBase.isValidProjectPath(myProjectPath)) { Messages.showErrorDialog(project, "The directory " + 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");