Skip to content

Commit dd08589

Browse files
committed
UnArchivePak: improved warning messages
1 parent 1b199f2 commit dd08589

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Unreal/UnArchivePak.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,15 @@ class FPakVFS : public FVirtualFileSystem
600600
}
601601
}
602602

603+
// Read number of files
604+
int32 count;
605+
*InfoReader << count;
606+
if (!count)
607+
{
608+
appPrintf("Empty pak file \"%s\"\n", *Filename);
609+
return true;
610+
}
611+
603612
// Process MountPoint
604613
bool badMountPoint = false;
605614
if (!MountPoint.RemoveFromStart("../../.."))
@@ -609,12 +618,10 @@ class FPakVFS : public FVirtualFileSystem
609618

610619
if (badMountPoint)
611620
{
612-
appNotify("WARNING: Pak \"%s\" has strange mount point \"%s\", mounting to root", *Filename, *MountPoint);
621+
appPrintf("WARNING: Pak \"%s\" has strange mount point \"%s\", mounting to root\n", *Filename, *MountPoint);
613622
MountPoint = "/";
614623
}
615624

616-
int count;
617-
*InfoReader << count;
618625
FileInfos.AddZeroed(count);
619626

620627
int numEncryptedFiles = 0;

0 commit comments

Comments
 (0)