Fixed permission checks on copies to virtual drives

This commit is contained in:
saibotu 2017-04-05 00:58:11 +02:00 committed by d0k3
parent a4e061aea6
commit 995f57ab23

View File

@ -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