convert lastPath to system-dependent before checking

This commit is contained in:
Gregory.Shrago
2017-07-27 04:16:51 +03:00
parent 42ef763546
commit 832ec51707
@@ -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;
}
}