diff --git a/td/telegram/files/FileGenerateManager.cpp b/td/telegram/files/FileGenerateManager.cpp index 476e523a..a03f3cc1 100644 --- a/td/telegram/files/FileGenerateManager.cpp +++ b/td/telegram/files/FileGenerateManager.cpp @@ -367,7 +367,7 @@ static Status check_mtime(std::string &conversion, CSlice original_path) { if (expected_mtime == actual_mtime) { return Status::OK(); } - return Status::Error(PSLICE() << "File \"" << original_path + return Status::Error(PSLICE() << "FILE_GENERATE_LOCATION_INVALID: File \"" << original_path << "\" was modified: " << tag("expected modification time", expected_mtime) << tag("actual modification time", actual_mtime)); } diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 4ec68d6a..486b4579 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -2465,6 +2465,10 @@ void FileManager::on_error_impl(FileNodePtr node, FileManager::Query::Type type, } } + if (begins_with(status.message(), "FILE_GENERATE_LOCATION_INVALID")) { + node->set_generate_location(nullptr); + } + if (status.message() == "FILE_UPLOAD_RESTART") { run_upload(node, {}); return;