File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
Plugins/Flow.Launcher.Plugin.Program/Programs Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -301,25 +301,19 @@ private static Win32 UrlProgram(string path)
301
301
var parser = new FileIniDataParser ( ) ;
302
302
var data = parser . ReadFile ( path ) ;
303
303
var urlSection = data [ "InternetShortcut" ] ;
304
- if ( urlSection != null )
304
+ var url = urlSection ? [ "URL" ] ;
305
+ foreach ( var protocol in Main . _settings . GetProtocols ( ) )
305
306
{
306
- var url = urlSection [ "URL" ] ;
307
- if ( url != null )
307
+ if ( url . StartsWith ( protocol ) )
308
308
{
309
- foreach ( var protocol in Main . _settings . GetProtocols ( ) )
310
- {
311
- if ( url . StartsWith ( protocol ) )
312
- {
313
- program . LnkResolvedPath = url ;
314
- program . Valid = true ;
315
- break ;
316
- }
317
- }
309
+ program . LnkResolvedPath = url ;
310
+ program . Valid = true ;
311
+ break ;
318
312
}
319
313
}
320
314
321
- var iconPath = urlSection [ "IconFile" ] ;
322
- if ( Path . GetExtension ( iconPath ) . Equals ( ".ico" , StringComparison . OrdinalIgnoreCase ) )
315
+ var iconPath = urlSection ? [ "IconFile" ] ;
316
+ if ( iconPath != null && Path . GetExtension ( iconPath ) . Equals ( ".ico" , StringComparison . OrdinalIgnoreCase ) )
323
317
{
324
318
program . IcoPath = iconPath ;
325
319
}
You can’t perform that action at this time.
0 commit comments