Skip to content

Commit be38792

Browse files
authored
Revert "reject empty readme file & fix error message for invalid extension (#8464)" (#8470)
This reverts commit 1eaa7e1.
1 parent 1eaa7e1 commit be38792

3 files changed

Lines changed: 2 additions & 24 deletions

File tree

src/NuGetGallery/Services/PackageMetadataValidationService.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -458,16 +458,6 @@ private async Task<PackageValidationResult> CheckReadmeMetadataAsync(PackageArch
458458
}
459459

460460
var readmeFileEntry = nuGetPackage.GetEntry(readmeFilePath);
461-
462-
if (readmeFileEntry.Length == 0)
463-
{
464-
return PackageValidationResult.Invalid(
465-
string.Format(
466-
Strings.ReadmeErrorEmpty,
467-
Strings.UploadPackage_ReadmeFileType,
468-
readmeFilePath));
469-
}
470-
471461
if (readmeFileEntry.Length > MaxAllowedReadmeLengthForUploading)
472462
{
473463
return PackageValidationResult.Invalid(

src/NuGetGallery/Strings.Designer.cs

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/NuGetGallery/Strings.resx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ The {1} Team</value>
11661166
<value>The &lt;readme&gt; element is not currently supported.</value>
11671167
</data>
11681168
<data name="UploadPackage_InvalidReadmeFileExtension" xml:space="preserve">
1169-
<value>The readme file has an invalid extension '{0}'. The extension must be: '{1}'.</value>
1169+
<value>The readme file has an invalid extension '{0}'. Extension must be one of the following: {1}.</value>
11701170
<comment>{0} is the readme file extension specified in the .nuspec, {1} is the list of allowed extensions</comment>
11711171
</data>
11721172
<data name="UploadPackage_ReadmeFileType" xml:space="preserve">
@@ -1215,7 +1215,4 @@ The {1} Team</value>
12151215
<data name="UploadPackage_OwnerlessIdNamespaceConflictHtml" xml:space="preserve">
12161216
<value>The package ID is reserved. You can upload your package with a different package ID. Reach out to &lt;a href="mailto:[email protected]"&gt;[email protected]&lt;/a&gt; if you have questions.</value>
12171217
</data>
1218-
<data name="ReadmeErrorEmpty" xml:space="preserve">
1219-
<value>The readme file '{0}' cannot be empty.</value>
1220-
</data>
12211218
</root>

0 commit comments

Comments
 (0)