loadFolder lnk support.

This commit is contained in:
Martín Lucas Golini
2024-10-17 01:28:14 -03:00
parent c29000c274
commit 66c57a11e4
2 changed files with 14 additions and 2 deletions

View File

@@ -2957,8 +2957,20 @@ void App::cleanUpRecentFolders() {
mRecentFolders = recentFolders;
}
void App::loadFolder( const std::string& path ) {
Clock dirTreeClock;
void App::loadFolder( std::string path ) {
if ( FileSystem::fileExtension( path ) == "lnk" ) {
auto target = Sys::getShortcutTarget( path );
if ( !target.empty() ) {
if ( FileSystem::fileExists( target ) )
path = target;
else
return;
} else if ( !FileSystem::fileExists( path ) )
return;
}
if ( !mCurrentProject.empty() ) {
closeEditors();
} else {