Add -lastproject editor command-line option to open the last project

This commit is contained in:
2025-12-17 03:29:43 +02:00
parent 42fa0ffdd1
commit 469a422681
3 changed files with 13 additions and 0 deletions

View File

@@ -537,6 +537,13 @@ int32 Editor::LoadProduct()
if (FileSystem::FileExists(lastProjectSettingPath))
File::ReadAllText(lastProjectSettingPath, lastProjectPath);
// Try to open the last project when requested
if (projectPath.IsEmpty() && CommandLine::Options.LastProject.IsTrue())
{
if (!lastProjectPath.IsEmpty() && FileSystem::DirectoryExists(lastProjectPath))
projectPath = lastProjectPath;
}
// Missing project case
if (projectPath.IsEmpty())
{