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.cs27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/SMAPI.ModBuildConfig/DeployModTask.cs b/src/SMAPI.ModBuildConfig/DeployModTask.cs
index 96d95e06..ced05a28 100644
--- a/src/SMAPI.ModBuildConfig/DeployModTask.cs
+++ b/src/SMAPI.ModBuildConfig/DeployModTask.cs
@@ -153,23 +153,22 @@ namespace StardewModdingAPI.ModBuildConfig
// create zip file
Directory.CreateDirectory(outputFolderPath);
- using (Stream zipStream = new FileStream(zipPath, FileMode.Create, FileAccess.Write))
- using (ZipArchive archive = new ZipArchive(zipStream, ZipArchiveMode.Create))
+ using Stream zipStream = new FileStream(zipPath, FileMode.Create, FileAccess.Write);
+ using ZipArchive archive = new ZipArchive(zipStream, ZipArchiveMode.Create);
+
+ foreach (var fileEntry in files)
{
- foreach (var fileEntry in files)
- {
- string relativePath = fileEntry.Key;
- FileInfo file = fileEntry.Value;
+ string relativePath = fileEntry.Key;
+ FileInfo file = fileEntry.Value;
- // get file info
- string filePath = file.FullName;
- string entryName = folderName + '/' + relativePath.Replace(Path.DirectorySeparatorChar, '/');
+ // get file info
+ string filePath = file.FullName;
+ string entryName = folderName + '/' + relativePath.Replace(Path.DirectorySeparatorChar, '/');
- // add to zip
- using (Stream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
- using (Stream fileStreamInZip = archive.CreateEntry(entryName).Open())
- fileStream.CopyTo(fileStreamInZip);
- }
+ // add to zip
+ using Stream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
+ using Stream fileStreamInZip = archive.CreateEntry(entryName).Open();
+ fileStream.CopyTo(fileStreamInZip);
}
}