mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Fix finding wrong name virtual files
This commit is contained in:
parent
98344a2076
commit
172a7c637d
15
source/fs.c
15
source/fs.c
@ -281,15 +281,6 @@ bool PathCopyVirtual(const char* destdir, const char* orig) {
|
|||||||
TruncateString(deststr, dest, 36, 8);
|
TruncateString(deststr, dest, 36, 8);
|
||||||
TruncateString(origstr, orig, 36, 8);
|
TruncateString(origstr, orig, 36, 8);
|
||||||
|
|
||||||
if (GetVirtualSource(dest)) { // check destination file flags
|
|
||||||
VirtualFile dvfile;
|
|
||||||
if (!FindVirtualFile(&dvfile, dest, 0))
|
|
||||||
return false;
|
|
||||||
if ((dvfile.flags & VFLAG_A9LH_AREA) &&
|
|
||||||
!ShowPrompt(true, "This is critical for A9LH:\n%s\nProceed writing to it?", deststr))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GetVirtualSource(dest) && GetVirtualSource(orig)) { // virtual to virtual
|
if (GetVirtualSource(dest) && GetVirtualSource(orig)) { // virtual to virtual
|
||||||
VirtualFile dvfile;
|
VirtualFile dvfile;
|
||||||
VirtualFile ovfile;
|
VirtualFile ovfile;
|
||||||
@ -304,6 +295,9 @@ bool PathCopyVirtual(const char* destdir, const char* orig) {
|
|||||||
ShowPrompt(false, "Virtual file size mismatch:\n%s\n%s", origstr, deststr);
|
ShowPrompt(false, "Virtual file size mismatch:\n%s\n%s", origstr, deststr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if ((dvfile.flags & VFLAG_A9LH_AREA) && // check A9LH critical area
|
||||||
|
!ShowPrompt(true, "This is critical for A9LH:\n%s\nProceed writing to it?", deststr))
|
||||||
|
return false;
|
||||||
if ((dvfile.keyslot == ovfile.keyslot) && (dvfile.offset == ovfile.offset)) // this improves copy times
|
if ((dvfile.keyslot == ovfile.keyslot) && (dvfile.offset == ovfile.offset)) // this improves copy times
|
||||||
dvfile.keyslot = ovfile.keyslot = 0xFF;
|
dvfile.keyslot = ovfile.keyslot = 0xFF;
|
||||||
|
|
||||||
@ -342,6 +336,9 @@ bool PathCopyVirtual(const char* destdir, const char* orig) {
|
|||||||
}
|
}
|
||||||
TruncateString(deststr, dest, 36, 8);
|
TruncateString(deststr, dest, 36, 8);
|
||||||
}
|
}
|
||||||
|
if ((dvfile.flags & VFLAG_A9LH_AREA) && // check A9LH critical area
|
||||||
|
!ShowPrompt(true, "This is critical for A9LH:\n%s\nProceed writing to it?", deststr))
|
||||||
|
return false;
|
||||||
if (dvfile.size != osize) {
|
if (dvfile.size != osize) {
|
||||||
char osizestr[32];
|
char osizestr[32];
|
||||||
char dsizestr[32];
|
char dsizestr[32];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user