From 29c81b42527ca72d1246e9bb1ca75d5ffc1c387d Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 31 Mar 2020 02:16:23 +0300 Subject: [PATCH] Warn on DcId change only for server locations. GitOrigin-RevId: 04f11a63d84882f7c1ccd15a79845b7482c6a451 --- td/telegram/files/FileManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 40ea427c..e15a9567 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -1394,9 +1394,11 @@ Result FileManager::merge(FileId x_file_id, FileId y_file_id, bool no_sy if (x_node->remote_.full && y_node->remote_.full && !x_node->remote_.full.value().is_web() && !y_node->remote_.full.value().is_web() && y_node->remote_.is_full_alive && + x_node->remote_.full_source == FileLocationSource::FromServer && + y_node->remote_.full_source == FileLocationSource::FromServer && x_node->remote_.full.value().get_dc_id() != y_node->remote_.full.value().get_dc_id()) { - LOG(WARNING) << "File remote location was changed from " << y_node->remote_.full.value() << " to " - << x_node->remote_.full.value(); + LOG(ERROR) << "File remote location was changed from " << y_node->remote_.full.value() << " to " + << x_node->remote_.full.value(); } auto count_local = [](auto &node) { return std::accumulate(node->file_ids_.begin(), node->file_ids_.end(), 0,