diff --git a/pkgs/by-name/et/etterna/0002-replays-dir-fix.patch b/pkgs/by-name/et/etterna/0002-replays-dir-fix.patch new file mode 100644 index 000000000000..a82fde9476bb --- /dev/null +++ b/pkgs/by-name/et/etterna/0002-replays-dir-fix.patch @@ -0,0 +1,58 @@ +diff --git a/src/Etterna/Models/HighScore/Replay.cpp b/src/Etterna/Models/HighScore/Replay.cpp +index 77e85b7ca0..1375e59142 100644 +--- a/src/Etterna/Models/HighScore/Replay.cpp ++++ b/src/Etterna/Models/HighScore/Replay.cpp +@@ -344,7 +344,7 @@ Replay::WriteReplayData() -> bool + return false; + } + +- const auto path = FULL_REPLAY_DIR + scoreKey; ++ const auto path = FILEMAN->ResolvePath(FULL_REPLAY_DIR + scoreKey); + + std::ofstream fileStream(path, std::ios::binary); + if (!fileStream) { +@@ -412,7 +412,7 @@ Replay::WriteInputData() -> bool + SetHighScoreMods(); + } + +- const auto path = INPUT_DATA_DIR + scoreKey; ++ const auto path = FILEMAN->ResolvePath(INPUT_DATA_DIR + scoreKey); + const auto path_z = path + "z"; + + std::ofstream fileStream(path, std::ios::binary); +@@ -566,7 +566,7 @@ Replay::LoadInputData(const std::string& replayDir) -> bool + return loadResultInputData; + } + +- const auto path = replayDir + scoreKey; ++ const auto path = FILEMAN->ResolvePath(replayDir + scoreKey); + const auto path_z = path + "z"; + std::vector readInputs; + std::vector vHoldReplayDataVector; +@@ -827,7 +827,7 @@ Replay::LoadReplayDataBasic(const std::string& replayDir) -> bool + std::string profiledir; + std::vector vNoteRowVector; + std::vector vOffsetVector; +- const auto path = replayDir + scoreKey; ++ const auto path = FILEMAN->ResolvePath(replayDir + scoreKey); + + std::ifstream fileStream(path, std::ios::binary); + std::string line; +@@ -917,7 +917,7 @@ Replay::LoadReplayDataFull(const std::string& replayDir) -> bool + std::vector vTrackVector; + std::vector vTapNoteTypeVector; + std::vector vHoldReplayDataVector; +- const auto path = replayDir + scoreKey; ++ const auto path = FILEMAN->ResolvePath(replayDir + scoreKey); + + std::ifstream fileStream(path, std::ios::binary); + std::string line; +@@ -1050,7 +1050,7 @@ Replay::LoadOnlineDataFromDisk(const std::string& replayDir) -> bool + std::vector tracks; + std::vector rows; + std::vector types; +- const auto path = replayDir + scoreKey; ++ const auto path = FILEMAN->ResolvePath(replayDir + scoreKey); + + std::ifstream fileStream(path, std::ios::binary); + diff --git a/pkgs/by-name/et/etterna/package.nix b/pkgs/by-name/et/etterna/package.nix index 569535a18b63..51d23d0abc1d 100644 --- a/pkgs/by-name/et/etterna/package.nix +++ b/pkgs/by-name/et/etterna/package.nix @@ -36,6 +36,7 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/etternagame/etterna/pull/1396 ./0001-Add-aarch64-linux-support.patch + ./0002-replays-dir-fix.patch ]; nativeBuildInputs = [