summaryrefslogtreecommitdiff
path: root/src/SMAPI.ModBuildConfig/DeployModTask.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.ModBuildConfig/DeployModTask.cs')
-rw-r--r--src/SMAPI.ModBuildConfig/DeployModTask.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/SMAPI.ModBuildConfig/DeployModTask.cs b/src/SMAPI.ModBuildConfig/DeployModTask.cs
index a09dd5d2..a5725a81 100644
--- a/src/SMAPI.ModBuildConfig/DeployModTask.cs
+++ b/src/SMAPI.ModBuildConfig/DeployModTask.cs
@@ -96,11 +96,14 @@ namespace StardewModdingAPI.ModBuildConfig
/// <param name="modFolderPath">The folder path to create with the mod files.</param>
private void CreateModFolder(IDictionary<string, FileInfo> files, string modFolderPath)
{
- Directory.CreateDirectory(modFolderPath);
foreach (var entry in files)
{
string fromPath = entry.Value.FullName;
string toPath = Path.Combine(modFolderPath, entry.Key);
+
+ // ReSharper disable once AssignNullToNotNullAttribute -- not applicable in this context
+ Directory.CreateDirectory(Path.GetDirectoryName(toPath));
+
File.Copy(fromPath, toPath, overwrite: true);
}
}