File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1536,7 +1536,9 @@ string determineBrowseDir()
15361536 Dictionary < string , int > subDirs = new Dictionary < string , int > ( ) ;
15371537 foreach ( var folder in Settings . Folders . Folders )
15381538 {
1539- string subDir = Directory . GetParent ( folder . Value ) . ToString ( ) ;
1539+ var parentDir = Directory . GetParent ( folder . Value ) ;
1540+ if ( parentDir == null ) { continue ; } // ignore content in top-level dir
1541+ string subDir = parentDir . ToString ( ) ;
15401542 if ( subDirs . ContainsKey ( subDir ) )
15411543 {
15421544 subDirs [ subDir ] += 1 ;
@@ -1556,16 +1558,16 @@ string determineBrowseDir()
15561558 }
15571559 }
15581560
1559- string brouwseDir = "" ;
1561+ string browseDir = "" ;
15601562 foreach ( var subDir in subDirs )
15611563 {
15621564 if ( subDir . Value == max )
15631565 {
1564- brouwseDir = subDir . Key ;
1566+ browseDir = subDir . Key ;
15651567 }
15661568 }
15671569
1568- return brouwseDir ;
1570+ return browseDir ;
15691571 }
15701572
15711573 #endregion
You can’t perform that action at this time.
0 commit comments