From 995f57ab23226040ec5f94e748d652d1c7dfb34d Mon Sep 17 00:00:00 2001 From: saibotu Date: Wed, 5 Apr 2017 00:58:11 +0200 Subject: [PATCH] Fixed permission checks on copies to virtual drives --- source/fs/fsutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fs/fsutil.c b/source/fs/fsutil.c index 598478d..ecc56a8 100644 --- a/source/fs/fsutil.c +++ b/source/fs/fsutil.c @@ -370,7 +370,7 @@ bool PathCopyVrtToVrt(const char* destdir, const char* orig, u32* flags) { dvfile.keyslot = ovfile.keyslot = 0xFF; // this improves copy times for virtual NAND // check write permissions - if ((!flags || !(*flags & OVERRIDE_PERM)) && !CheckWritePermissions(destdir)) + if ((!flags || !(*flags & OVERRIDE_PERM)) && !CheckWritePermissions(dest)) return false; // unmount critical NAND drives @@ -438,7 +438,7 @@ bool PathCopyFatToVrt(const char* destdir, const char* orig, u32* flags) { } // check write permissions - if ((!flags || !(*flags & OVERRIDE_PERM)) && !CheckWritePermissions(destdir)) + if ((!flags || !(*flags & OVERRIDE_PERM)) && !CheckWritePermissions(dest)) return false; // FAT file