From f444c8d3d19c287ada1ed5147745847acd5bd3e1 Mon Sep 17 00:00:00 2001 From: Erika <50500602+Enbika@users.noreply.github.com> Date: Wed, 31 Mar 2021 09:59:26 -0600 Subject: [PATCH] Fix replay crashes --- source/LoadReplayState.hx | 2 +- source/Replay.hx | 4 ++-- source/TitleState.hx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/LoadReplayState.hx b/source/LoadReplayState.hx index e4bb136..1be8679 100644 --- a/source/LoadReplayState.hx +++ b/source/LoadReplayState.hx @@ -33,7 +33,7 @@ class LoadReplayState extends MusicBeatState { var menuBG:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menuDesat')); #if sys - controlsStrings = sys.FileSystem.readDirectory(Sys.getCwd() + "\\assets\\replays\\"); + controlsStrings = sys.FileSystem.readDirectory(Sys.getCwd() + "/assets/replays/"); #end trace(controlsStrings); diff --git a/source/Replay.hx b/source/Replay.hx index 001f981..3bf37a0 100644 --- a/source/Replay.hx +++ b/source/Replay.hx @@ -85,10 +85,10 @@ class Replay public function LoadFromJSON() { #if sys - trace('loading ' + Sys.getCwd() + 'assets\\replays\\' + path + ' replay...'); + trace('loading ' + Sys.getCwd() + 'assets/replays/' + path + ' replay...'); try { - var repl:ReplayJSON = cast Json.parse(File.getContent(Sys.getCwd() + "assets\\replays\\" + path)); + var repl:ReplayJSON = cast Json.parse(File.getContent(Sys.getCwd() + "assets/replays/" + path)); replay = repl; } catch(e) diff --git a/source/TitleState.hx b/source/TitleState.hx index e4d9d5b..a8515b5 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -52,8 +52,8 @@ class TitleState extends MusicBeatState #end #if sys - if (!sys.FileSystem.exists(Sys.getCwd() + "\\assets\\replays")) - sys.FileSystem.createDirectory(Sys.getCwd() + "\\assets\\replays"); + if (!sys.FileSystem.exists(Sys.getCwd() + "/assets/replays")) + sys.FileSystem.createDirectory(Sys.getCwd() + "/assets/replays"); #end