This commit is contained in:
Oleksii Holub
2022-04-06 19:00:19 +03:00
parent e29f08264c
commit aea96d5eba
3 changed files with 13 additions and 16 deletions

View File

@@ -103,7 +103,7 @@ internal partial class MediaDownloader
// Otherwise, use the original file name but inject the hash in the middle
var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName);
var fileExtension = Path.GetExtension(fileName);
// Probably not a file extension, just a dot in a long file name
// https://github.com/Tyrrrz/DiscordChatExporter/issues/708
if (fileExtension.Length > 41)
@@ -114,4 +114,4 @@ internal partial class MediaDownloader
return PathEx.EscapeFileName(fileNameWithoutExtension.Truncate(42) + '-' + urlHash + fileExtension);
}
}
}