Fix song path not escaped while loading.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Cryville.Audio.Source.Libav;
|
using Cryville.Audio.Source.Libav;
|
||||||
|
using Cryville.Common;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ namespace Cryville.Crtr.Event {
|
|||||||
else if (ev.Unstamped == null) { }
|
else if (ev.Unstamped == null) { }
|
||||||
else if (ev.Unstamped is Chart.Sound) {
|
else if (ev.Unstamped is Chart.Sound) {
|
||||||
Chart.Sound tev = (Chart.Sound)ev.Unstamped;
|
Chart.Sound tev = (Chart.Sound)ev.Unstamped;
|
||||||
var dir = new DirectoryInfo(Path.Combine(Game.GameDataPath, "songs", tev.id));
|
var dir = new DirectoryInfo(Path.Combine(Game.GameDataPath, "songs", StringUtils.EscapeFileName(tev.id)));
|
||||||
var files = dir.GetFiles();
|
var files = dir.GetFiles();
|
||||||
var source = new LibavFileAudioSource(files[0].FullName);
|
var source = new LibavFileAudioSource(files[0].FullName);
|
||||||
source.SelectStream();
|
source.SelectStream();
|
||||||
|
Reference in New Issue
Block a user