Add 4 more allowed characters for file name from file extension in accordance with Telegram server-side limit.

This commit is contained in:
levlam 2022-04-20 19:31:30 +03:00
parent 0baf4cb070
commit c021bdfb98

View File

@ -159,8 +159,8 @@ string clean_filename(CSlice name) {
}
PathView path_view(name);
auto filename = clean_filename_part(path_view.file_stem(), 60);
auto extension = clean_filename_part(path_view.extension(), 20);
auto filename = clean_filename_part(path_view.file_stem(), 64);
auto extension = clean_filename_part(path_view.extension(), 16);
if (!extension.empty()) {
if (filename.empty()) {
filename = std::move(extension);