mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-05-01 13:24:27 +02:00
This reverts commit 04cbfae438e9c9463062df1f117a011a9f1c2969.
This commit is contained in:
parent
04cbfae438
commit
c60cce17dd
@ -382,7 +382,7 @@ namespace HeavenStudio.Editor
|
|||||||
|
|
||||||
private void SaveRemixFile(string path)
|
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))
|
using (var archive = new ZipArchive(zipFile, ZipArchiveMode.Update))
|
||||||
{
|
{
|
||||||
@ -390,14 +390,12 @@ namespace HeavenStudio.Editor
|
|||||||
using (var zipStream = levelFile.Open())
|
using (var zipStream = levelFile.Open())
|
||||||
zipStream.Write(Encoding.UTF8.GetBytes(GetJson()), 0, Encoding.UTF8.GetBytes(GetJson()).Length);
|
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);
|
var musicFile = archive.CreateEntry("song.ogg", System.IO.Compression.CompressionLevel.NoCompression);
|
||||||
using (var zipStream = musicFile.Open())
|
using (var zipStream = musicFile.Open())
|
||||||
zipStream.Write(MusicBytes, 0, MusicBytes.Length);
|
zipStream.Write(MusicBytes, 0, MusicBytes.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
currentRemixPath = path;
|
currentRemixPath = path;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user