Fix field name and remove unused field.

GitOrigin-RevId: 81c8488f44562536a01deb365e3901b052131d54
This commit is contained in:
levlam 2018-03-07 02:23:09 +03:00
parent 20f821017d
commit f041bf4cc8
2 changed files with 4 additions and 5 deletions

View File

@ -743,14 +743,14 @@ Result<FileId> FileManager::register_file(FileData data, FileLocationSource file
bool new_remote = false;
int32 remote_key = 0;
if (file_view.has_remote_location()) {
RemoteInfo info{file_view.remote_location(), file_id, file_location_source};
RemoteInfo info{file_view.remote_location(), file_id};
remote_key = remote_location_info_.add(info);
auto &stored_info = remote_location_info_.get(remote_key);
if (stored_info.file_id == file_id) {
if (stored_info.file_id_ == file_id) {
get_file_id_info(file_id)->pin_flag_ = true;
new_remote = true;
} else {
to_merge.push_back(stored_info.file_id);
to_merge.push_back(stored_info.file_id_);
if (stored_info.remote_ == file_view.remote_location() &&
stored_info.remote_.get_access_hash() != file_view.remote_location().get_access_hash() &&
file_location_source == FileLocationSource::FromServer) {

View File

@ -378,8 +378,7 @@ class FileManager : public FileLoadManager::Callback {
struct RemoteInfo {
FullRemoteFileLocation remote_;
FileId file_id;
FileLocationSource source_;
FileId file_id_;
bool operator==(const RemoteInfo &other) const {
return this->remote_ == other.remote_;
}