From 340a25651825e4ed3267dbc9f1ab0124a6a882ae Mon Sep 17 00:00:00 2001 From: shchmue Date: Tue, 15 Oct 2019 11:14:14 -0600 Subject: [PATCH] Fix the f_mkdir fix --- source/keys/keys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/keys/keys.c b/source/keys/keys.c index 4a2c8a3..7caca15 100644 --- a/source/keys/keys.c +++ b/source/keys/keys.c @@ -1039,7 +1039,9 @@ key_output: ; gfx_printf("%kLockpick totally done in %d us\n\n", colors[(color_idx++) % 6], end_time - begin_time); gfx_printf("%kFound through master_key_%02x.\n\n", colors[(color_idx++) % 6], MAX_KEY - 1); - if (f_mkdir("sd:/switch") != FR_EXIST) { + FRESULT dir_rc = FR_OK; + dir_rc = f_mkdir("sd:/switch"); + if (dir_rc != FR_EXIST && dir_rc != FR_OK) { EPRINTF("Unable to create /switch folder on SD.\nNo keyfiles written."); goto free_buffers; }