From a1e07515ba313e5e1fdbca4f1d64c0ec826e41ae Mon Sep 17 00:00:00 2001 From: David Proskin Date: Mon, 23 Dec 2024 16:02:33 -0500 Subject: [PATCH] Fixes delete roms (and anything else relying on PVEmulatorCongifuration returning the correct path for a game, such as move rom to system). We were computing the directory for the ROM incorrectly, so it was never being found. --- .../PVLibrary/Configuration/PVEmulatorConfiguration.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PVLibrary/Sources/PVLibrary/Configuration/PVEmulatorConfiguration.swift b/PVLibrary/Sources/PVLibrary/Configuration/PVEmulatorConfiguration.swift index fb96bc03c5..9b9ae10327 100644 --- a/PVLibrary/Sources/PVLibrary/Configuration/PVEmulatorConfiguration.swift +++ b/PVLibrary/Sources/PVLibrary/Configuration/PVEmulatorConfiguration.swift @@ -320,10 +320,11 @@ public extension PVEmulatorConfiguration { } class func path(forGame game: PVGame) -> URL { - return URL.documentsiCloudOrLocalPath.appendingPathComponent(game.systemIdentifier).appendingPathComponent(game.file.url.lastPathComponent) + return + PVEmulatorConfiguration.romDirectory(forSystemIdentifier: game.systemIdentifier).appendingPathComponent(game.file.url.lastPathComponent) } class func path(forGame game: PVGame, url:URL) -> URL { - return URL.documentsiCloudOrLocalPath.appendingPathComponent(game.systemIdentifier).appendingPathComponent(url.lastPathComponent) + return PVEmulatorConfiguration.romDirectory(forSystemIdentifier: game.systemIdentifier).appendingPathComponent(url.lastPathComponent) } }