diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-11 15:31:29 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-11 15:31:29 -0400 |
commit | 3cfc27245338cde5416176473b554226df693ef2 (patch) | |
tree | 69f9bfd2eee37fe7b7217fe264003254612d138f /src/SMAPI.ModBuildConfig | |
parent | 127b36dedd9defe11b2d3f9ce0fa088efcf8c5f0 (diff) | |
download | SMAPI-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.cs | 5 |
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); } } |