Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
OnlyFart committed Oct 23, 2024
1 parent c3ddadf commit 7d63795
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Core/Logic/Builders/AdditionaFileBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public async Task Build(Book book) {
_logger.LogInformation($"Начинаю сохранение изображений из части {chapter.Title.CoverQuotes()}");
var c = 0;
foreach (var image in chapter.Images) {
var fileName = Path.Combine(subPath, $"{++c}{Path.GetExtension(image.FullName)}");
var fileName = Path.Combine(subPath, $"{++c}{Path.GetExtension(image.FullName)}".RemoveInvalidChars());
await File.WriteAllBytesAsync(fileName, image.Content);
}

Expand All @@ -59,7 +59,7 @@ public async Task Build(Book book) {
var subPath = Path.Combine(additionalPath, AdditionalTypeEnum.Images.ToString());
CreateDirectory(subPath);

var fileName = Path.Combine(subPath, $"Cover{Path.GetExtension(book.Cover.FullName)}");
var fileName = Path.Combine(subPath, $"Cover{Path.GetExtension(book.Cover.FullName)}".RemoveInvalidChars());
await File.WriteAllBytesAsync(fileName, book.Cover.Content);
}
}
Expand All @@ -74,7 +74,7 @@ public async Task Build(Book book) {
CreateDirectory(subPath);

foreach (var file in files.Value) {
var fileName = Path.Combine(subPath, file.FullName);
var fileName = Path.Combine(subPath, file.FullName.RemoveInvalidChars());
_logger.LogInformation($"Начинаю сохранение дополнительного файла {fileName.CoverQuotes()}");
await File.WriteAllBytesAsync(fileName, file.Content);
_logger.LogInformation($"Cохранение дополнительного файла {fileName.CoverQuotes()} завершено");
Expand Down

0 comments on commit 7d63795

Please sign in to comment.