Fix download of levels

This commit is contained in:
MysterD 2022-04-08 19:42:51 -07:00
parent 8805ec2a07
commit 2dc50f2909
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ void network_receive_mod_list(struct Packet* p) {
packet_read(p, &relativePathLength, sizeof(u16)); packet_read(p, &relativePathLength, sizeof(u16));
packet_read(p, file->relativePath, relativePathLength * sizeof(u8)); packet_read(p, file->relativePath, relativePathLength * sizeof(u8));
packet_read(p, &file->size, sizeof(u64)); packet_read(p, &file->size, sizeof(u64));
if (mod->isDirectory && !strstr(file->relativePath, "actors")) { if (mod->isDirectory && !strstr(file->relativePath, "actors") && !strstr(file->relativePath, "levels")) {
char tmp[SYS_MAX_PATH]; char tmp[SYS_MAX_PATH];
if (snprintf(tmp, SYS_MAX_PATH, "%s-%s", mod->relativePath, file->relativePath) >= 0) { if (snprintf(tmp, SYS_MAX_PATH, "%s-%s", mod->relativePath, file->relativePath) >= 0) {
memcpy(file->relativePath, tmp, strlen(tmp) + 1); memcpy(file->relativePath, tmp, strlen(tmp) + 1);