SteamShellExtension now checks for file size before parsing

This commit is contained in:
s_falahati 2017-08-07 20:56:45 +04:30
parent c30c30f638
commit dd6ca6f073

View File

@ -61,7 +61,7 @@ namespace HeliosDisplayManagement.ShellExtension
try
{
var fileAddress = SelectedItemPaths.FirstOrDefault();
if (!string.IsNullOrWhiteSpace(fileAddress) && File.Exists(fileAddress))
if (!string.IsNullOrWhiteSpace(fileAddress) && File.Exists(fileAddress) && new FileInfo(fileAddress).Length < 1024)
{
var fileContent = File.ReadAllText(fileAddress);
if (!fileContent.Contains(@"[InternetShortcut]"))