IDEA-88207 Attempt to reopen ipr-based project is rejected with "does not exist" error message

This commit is contained in:
peter
2012-07-03 17:49:29 +02:00
parent d10b1728f6
commit 2bd78516ca
@@ -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");