summaryrefslogtreecommitdiff
path: root/src/SMAPI.ModBuildConfig
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-10-11 15:31:29 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-10-11 15:31:29 -0400
commit3cfc27245338cde5416176473b554226df693ef2 (patch)
tree69f9bfd2eee37fe7b7217fe264003254612d138f /src/SMAPI.ModBuildConfig
parent127b36dedd9defe11b2d3f9ce0fa088efcf8c5f0 (diff)
downloadSMAPI-3cfc27245338cde5416176473b554226df693ef2.tar.gz
SMAPI-3cfc27245338cde5416176473b554226df693ef2.tar.bz2
SMAPI-3cfc27245338cde5416176473b554226df693ef2.zip
fix mod deploy failing to create subfolders if they don't already exist
Diffstat (limited to 'src/SMAPI.ModBuildConfig')
-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);
}
}