mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
SteamShellExtension now checks for file size before parsing
This commit is contained in:
parent
c30c30f638
commit
dd6ca6f073
@ -61,7 +61,7 @@ namespace HeliosDisplayManagement.ShellExtension
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var fileAddress = SelectedItemPaths.FirstOrDefault();
|
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);
|
var fileContent = File.ReadAllText(fileAddress);
|
||||||
if (!fileContent.Contains(@"[InternetShortcut]"))
|
if (!fileContent.Contains(@"[InternetShortcut]"))
|
||||||
|
Loading…
Reference in New Issue
Block a user