Skip to content

Commit bf68cb3

Browse files
committed
Fixed: Setting mod Image to Image already in Folder No Longer Fails
1 parent 11f067b commit bf68cb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/Reloaded.Mod.Launcher.Lib/Commands/Mod/SetModImageCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public void Execute(object? parameter)
3232
string iconPath = Path.Combine(modDirectory, iconFileName);
3333

3434
// Copy image and set config file path.
35-
File.Copy(imagePath, iconPath, true);
35+
if (!imagePath.Equals(iconPath, StringComparison.OrdinalIgnoreCase))
36+
File.Copy(imagePath, iconPath, true);
37+
3638
_modTuple.Config.ModIcon = iconFileName;
3739
_modTuple.Save();
3840
}

0 commit comments

Comments
 (0)