Fix opening nonexistent files from CLI.

This commit is contained in:
Martín Lucas Golini
2025-12-29 19:42:06 -03:00
parent 35cd04e490
commit 34d6115db8
4 changed files with 18 additions and 13 deletions

View File

@@ -3386,8 +3386,8 @@ void App::initProjectTreeView( std::string path, bool openClean ) {
if ( FileSystem::fileExists( rpath ) ) {
loadFileFromPath( rpath, false, nullptr, onLoaded );
} else if ( FileSystem::fileCanWrite( path ) ) {
loadFileFromPath( path, false, nullptr, onLoaded );
} else if ( FileSystem::fileCanWrite( folderPath ) ) {
loadFileFromPath( rpath, false, nullptr, onLoaded );
}
// If we opened a new tab and the first tab is simply empty, discard it