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 authored and GitHub committed 2025-01-12 23:11:56 +00:00
1 parent 2e14e4b09b
commit fd1d461ea8
1 file changed
+4
+4
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) {