Skip to content

Commit

Permalink
Fixed: Setting mod Image to Image already in Folder No Longer Fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed May 30, 2024
1 parent 11f067b commit bf68cb3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public void Execute(object? parameter)
string iconPath = Path.Combine(modDirectory, iconFileName);

// Copy image and set config file path.
File.Copy(imagePath, iconPath, true);
if (!imagePath.Equals(iconPath, StringComparison.OrdinalIgnoreCase))
File.Copy(imagePath, iconPath, true);

_modTuple.Config.ModIcon = iconFileName;
_modTuple.Save();
}
Expand Down

0 comments on commit bf68cb3

Please sign in to comment.