Fix update when homebrew nro is not /switch/sphaira/sphaira.nro. (#64)

Signed-off-by: shadow2560 <24191064+shadow2560@users.noreply.github.com>
This commit is contained in:
shadow2560
2025-01-13 00:11:56 +01:00
committed by GitHub
parent 2e14e4b09b
commit fd1d461ea8

View File

@@ -89,6 +89,10 @@ auto InstallUpdate(ProgressBox* pbox, const std::string url, const std::string v
file_path = fs::AppendPath("/", file_path);
}
if (!strcasecmp(strrchr(file_path.s, '/'), "/sphaira.nro")) {
file_path = App::GetExePath();
}
Result rc;
if (file_path[strlen(file_path) -1] == '/') {
if (R_FAILED(rc = fs.CreateDirectoryRecursively(file_path)) && rc != FsError_PathAlreadyExists) {