Skip to content

Commit

Permalink
chore: reverted file to previous state
Browse files Browse the repository at this point in the history
  • Loading branch information
pictos authored and nickrandolph committed Sep 21, 2023
1 parent b0c5d01 commit 6e8739b
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions src/Resizetizer/src/ResizeImageInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,40 +83,17 @@ public static List<ResizeImageInfo> Parse(IEnumerable<ITaskItem>? images)
throw new FileNotFoundException("Unable to find background file: " + fileInfo.FullName, fileInfo.FullName);
}

if (bool.TryParse(image.GetMetadata(nameof(IsAppIcon)), out var iai))
{
info.IsAppIcon = iai;
}

info.Filename = fileInfo.FullName;

info.Alias = image.GetMetadata("Link");

if (string.IsNullOrWhiteSpace(info.Alias))
{
var windowsAndAppIcon = ResizetizeImages_v0._TargetFramework == "windows" && info.IsAppIcon;

if (!windowsAndAppIcon)
{
var projDirectory = image.GetMetadata("DefiningProjectDirectory");
var projDirectory = image.GetMetadata("DefiningProjectDirectory");

if (!string.IsNullOrWhiteSpace(projDirectory))
{
info.Alias = fileInfo.FullName.Replace(projDirectory, string.Empty);
}
}
else
if (!string.IsNullOrWhiteSpace(projDirectory))
{

#if DEBUG_RESIZETIZER
System.Diagnostics.Debugger.Launch();
#endif
var projDirectory = image.GetMetadata("ProjectDirectory");

if (!string.IsNullOrWhiteSpace(projDirectory))
{
info.Alias = fileInfo.FullName.Replace(projDirectory, string.Empty);
}
info.Alias = fileInfo.FullName.Replace(projDirectory, string.Empty);
}
}

Expand Down

0 comments on commit 6e8739b

Please sign in to comment.