Verify the last project path before using it
This commit is contained in:
@@ -536,13 +536,12 @@ int32 Editor::LoadProduct()
|
|||||||
String lastProjectPath;
|
String lastProjectPath;
|
||||||
if (FileSystem::FileExists(lastProjectSettingPath))
|
if (FileSystem::FileExists(lastProjectSettingPath))
|
||||||
File::ReadAllText(lastProjectSettingPath, lastProjectPath);
|
File::ReadAllText(lastProjectSettingPath, lastProjectPath);
|
||||||
|
if (!FileSystem::DirectoryExists(lastProjectPath))
|
||||||
|
lastProjectPath = String::Empty;
|
||||||
|
|
||||||
// Try to open the last project when requested
|
// Try to open the last project when requested
|
||||||
if (projectPath.IsEmpty() && CommandLine::Options.LastProject.IsTrue())
|
if (projectPath.IsEmpty() && CommandLine::Options.LastProject.IsTrue() && !lastProjectPath.IsEmpty())
|
||||||
{
|
projectPath = lastProjectPath;
|
||||||
if (!lastProjectPath.IsEmpty() && FileSystem::DirectoryExists(lastProjectPath))
|
|
||||||
projectPath = lastProjectPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Missing project case
|
// Missing project case
|
||||||
if (projectPath.IsEmpty())
|
if (projectPath.IsEmpty())
|
||||||
|
|||||||
Reference in New Issue
Block a user