From af68c340cf69951fdc5d74b8bb88ac6c43efeeb0 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 5 Jan 2023 18:58:45 +0100 Subject: [PATCH] Only show update warning if "/vol/storage_mlc01/sys/update" exists and is actually a directory --- source/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index d106302..ceccdd0 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -49,8 +49,9 @@ int32_t main(int32_t argc, char **argv) { if (client > 0) { if (Mocha_UnlockFSClientEx(client) == MOCHA_RESULT_SUCCESS) { // test if the update folder exists - FSStat stat; - if (FSAGetStat(client, "/vol/storage_mlc01/sys/update", &stat) >= 0) { + FSADirectoryHandle dirHandle; + if (FSAOpenDir(client, "/vol/storage_mlc01/sys/update", &dirHandle) >= 0) { + FSACloseDir(client, dirHandle); handleUpdateWarningScreen(); } }