You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"You have BepInEx.dll in your .zip file. BepInEx should probably be a dependency in your manifest.json file instead."
241
-
);
242
-
}
143
+
if(result.errors.fileErrors.length>0){
144
+
setFormErrors(result.errors);
243
145
244
-
if(hasAssemblyCSharp){
245
-
errors.fileErrors.push(
246
-
"You have Assembly-CSharp.dll in your .zip file. Your mod may be removed if you do not have permission to distribute this file."
247
-
);
248
-
}
249
-
250
-
if(dllCount>8){
251
-
errors.fileErrors.push(
252
-
"You have "+
253
-
dllCount+
254
-
" .dll files in your .zip file. Some of these files may be unnecessary."
255
-
);
256
-
maybeModpack=true;
257
-
}
258
-
259
-
if(maybeModpack){
260
-
errors.fileErrors.push(
261
-
"If you're making a modpack, do not include the files for each mod in your .zip file. Instead, put the dependency string for each mod inside your manifest.json file."
262
-
);
263
-
}
264
-
265
-
if(
266
-
noRootFiles&&
267
-
hasManifest&&
268
-
hasIcon&&
269
-
hasReadMe&&
270
-
!rootManifest&&
271
-
!rootIcon&&
272
-
!rootReadMe
273
-
){
274
-
blockUpload=true;
275
-
errors.fileErrors.push(
276
-
"Your manifest, icon, and README files should be at the root of the .zip file. You can prevent this by compressing the contents of a folder, rather than the folder itself."
277
-
);
278
-
}else{
279
-
if(!hasManifest){
280
-
blockUpload=true;
281
-
errors.fileErrors.push(
282
-
"Your package is missing a manifest.json file!"
283
-
);
284
-
}elseif(!rootManifest){
285
-
blockUpload=true;
286
-
errors.fileErrors.push(
287
-
"Your manifest.json file is not at the root of the .zip!"
288
-
);
289
-
}
290
-
291
-
if(!hasIcon){
292
-
blockUpload=true;
293
-
errors.fileErrors.push(
294
-
"Your package is missing an icon.png file!"
295
-
);
296
-
}elseif(!rootIcon){
297
-
blockUpload=true;
298
-
errors.fileErrors.push(
299
-
"Your icon.png file is not at the root of the .zip!"
300
-
);
301
-
}
302
-
303
-
if(!hasReadMe){
304
-
blockUpload=true;
305
-
errors.fileErrors.push(
306
-
"Your package is missing a README.md file!"
307
-
);
308
-
}elseif(!rootReadMe){
309
-
blockUpload=true;
310
-
errors.fileErrors.push(
311
-
"Your README.md file is not at the root of the .zip!"
146
+
if(result.blockUpload){
147
+
result.errors.generalErrors.push(
148
+
"An error with your selected file is preventing submission."
312
149
);
150
+
setSubmissionStatus(SubmissionStatus.ERROR);
313
151
}
314
152
}
315
-
316
-
awaitzipReader.close();
317
-
}catch(e){
318
-
console.log("Error reading zip: "+e);
319
-
returnfalse;
320
-
}
321
-
}
322
-
323
-
if(errors.fileErrors.length>0){
324
-
setFormErrors(errors);
325
-
326
-
if(blockUpload){
327
-
errors.generalErrors.push(
328
-
"An error with your selected file is preventing submission."
0 commit comments