File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22using System . Collections . Concurrent ;
33using System . Collections . Generic ;
44using System . IO ;
5+ using System . Linq ;
56using System . Threading . Tasks ;
67using ICSharpCode . SharpZipLib . Core ;
78using Microsoft . AspNetCore . Hosting ;
@@ -41,14 +42,11 @@ public async Task Initialize()
4142 }
4243
4344 ElevationHelper . UnzipIfNeeded ( _fileProvider , _logger ) ;
44- var hgtFiles = _fileProvider . GetDirectoryContents ( ElevationHelper . ELEVATION_CACHE ) ;
45-
45+ var hgtFiles = _fileProvider . GetDirectoryContents ( ElevationHelper . ELEVATION_CACHE )
46+ . Where ( f => f . PhysicalPath . EndsWith ( ".hgt" ) ) . ToArray ( ) ;
47+ _logger . LogInformation ( $ "Found { hgtFiles . Length } hgt files.") ;
4648 foreach ( var hgtFile in hgtFiles )
4749 {
48- if ( ! hgtFile . PhysicalPath . EndsWith ( ".hgt" ) )
49- {
50- continue ;
51- }
5250 var key = ElevationHelper . FileNameToKey ( hgtFile . Name ) ;
5351 if ( key == null )
5452 {
You can’t perform that action at this time.
0 commit comments