From 3a47113dab3f6754140a58f022d2448a53c48593 Mon Sep 17 00:00:00 2001 From: Lectem Date: Sun, 23 Nov 2014 22:58:11 +0100 Subject: [PATCH] added svcCloseHandle to FSDIR_Close() FSDIR_Close() and FSFILE_Close() should have the same behavior --- libctru/source/services/fs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libctru/source/services/fs.c b/libctru/source/services/fs.c index 27f3e06..51af7b5 100644 --- a/libctru/source/services/fs.c +++ b/libctru/source/services/fs.c @@ -1331,6 +1331,7 @@ FSDIR_Close(Handle handle) Result ret = 0; if((ret = svcSendSyncRequest(handle))) return ret; - - return cmdbuf[1]; + ret = cmdbuf[1]; + if(!ret)ret = svcCloseHandle(handle); + return ret; }