2
0

resolves #27 Foldernames ending in '.'

This commit is contained in:
glax 2023-05-25 22:22:57 +02:00
parent aa1f9b1b56
commit a1e9dd0232

View File

@ -42,6 +42,8 @@ public readonly struct Publication
this.status = status; this.status = status;
this.publicationId = publicationId; this.publicationId = publicationId;
this.folderName = string.Concat(LegalCharacters.Matches(sortName)); this.folderName = string.Concat(LegalCharacters.Matches(sortName));
while (this.folderName.EndsWith('.'))
this.folderName = this.folderName.Substring(0, this.folderName.Length - 1);
string onlyLowerLetters = string.Concat(this.sortName.ToLower().Where(Char.IsLetter)); string onlyLowerLetters = string.Concat(this.sortName.ToLower().Where(Char.IsLetter));
this.internalId = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{onlyLowerLetters}{this.year}")); this.internalId = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{onlyLowerLetters}{this.year}"));
} }