mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-08 18:55:07 +00:00
This reverts commit 33f17dcbad
.
This commit is contained in:
parent
33f17dcbad
commit
91e7572883
1 changed files with 2 additions and 4 deletions
|
@ -382,7 +382,7 @@ namespace HeavenStudio.Editor
|
|||
|
||||
private void SaveRemixFile(string path)
|
||||
{
|
||||
using (FileStream zipFile = File.Open(path, FileMode.OpenOrCreate))
|
||||
using (FileStream zipFile = File.Open(path, FileMode.Create))
|
||||
{
|
||||
using (var archive = new ZipArchive(zipFile, ZipArchiveMode.Update))
|
||||
{
|
||||
|
@ -390,14 +390,12 @@ namespace HeavenStudio.Editor
|
|||
using (var zipStream = levelFile.Open())
|
||||
zipStream.Write(Encoding.UTF8.GetBytes(GetJson()), 0, Encoding.UTF8.GetBytes(GetJson()).Length);
|
||||
|
||||
if ((MusicBytes != null) && (changedMusic == true))
|
||||
if (MusicBytes != null)
|
||||
{
|
||||
Debug.Log("Saving music...");
|
||||
var musicFile = archive.CreateEntry("song.ogg", System.IO.Compression.CompressionLevel.NoCompression);
|
||||
using (var zipStream = musicFile.Open())
|
||||
zipStream.Write(MusicBytes, 0, MusicBytes.Length);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
currentRemixPath = path;
|
||||
|
|
Loading…
Reference in a new issue