@ -231,14 +231,13 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
if ( ! globalDataDir . empty ( ) )
directories . insert ( 0 , Files : : pathToQString ( globalDataDir ) ) ;
// normalize user supplied directories: resolve symlink, convert to native separator, make absolute
for ( auto & currentDir : directories )
currentDir = QDir ( QDir : : cleanPath ( currentDir ) ) . canonicalPath ( ) ;
std : : unordered_set < QString > visitedDirectories ;
for ( const QString & currentDir : directories )
{
if ( ! visitedDirectories . insert ( currentDir ) . second )
// normalize user supplied directories: resolve symlink, convert to native separator, make absolute
const QString canonicalDirPath = QDir ( QDir : : cleanPath ( currentDir ) ) . canonicalPath ( ) ;
if ( ! visitedDirectories . insert ( canonicalDirPath ) . second )
continue ;
// add new achives files presents in current directory
@ -247,7 +246,7 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
QString tooltip ;
// add content files presents in current directory
mSelector - > addFiles ( currentDir , mNewDataDirs . contains ( c urrentDir ) ) ;
mSelector - > addFiles ( currentDir , mNewDataDirs . contains ( c anonicalDirPath ) ) ;
// add current directory to list
ui . directoryListWidget - > addItem ( currentDir ) ;
@ -255,7 +254,7 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
auto * item = ui . directoryListWidget - > item ( row ) ;
// Display new content with green background
if ( mNewDataDirs . contains ( c urrentDir ) )
if ( mNewDataDirs . contains ( c anonicalDirPath ) )
{
tooltip + = " Will be added to the current profile \n " ;
item - > setBackground ( Qt : : green ) ;