File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/Files.App/ServicesImplementation Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1- using Files . App . Controllers ;
2- using Files . App . DataModels ;
3- using Files . App . Filesystem ;
4- using Files . App . Shell ;
1+ using Files . App . Shell ;
52using Files . Shared . Extensions ;
63using System ;
74using System . Collections . Generic ;
@@ -20,7 +17,9 @@ public async Task<List<string>> GetPinnedFoldersAsync()
2017 . Where ( link => link . IsFolder )
2118 . Select ( link => link . FilePath ) . ToList ( ) ;
2219
23- sidebarItems . RemoveRange ( sidebarItems . Count - 4 , 4 ) ; // 4 is the number of recent items shown in explorer sidebar
20+ if ( sidebarItems . Count > 4 ) // Avoid first opening crash #11139
21+ sidebarItems . RemoveRange ( sidebarItems . Count - 4 , 4 ) ; // 4 is the number of recent items shown in explorer sidebar
22+
2423 return sidebarItems ;
2524 }
2625
You can’t perform that action at this time.
0 commit comments