Do not remove file reference from remote.id.

GitOrigin-RevId: 3c934cec452f4ca4147aa81711fcd0ac1fee964a
This commit is contained in:
levlam 2020-01-16 05:09:25 +03:00
parent 40b9ff17ec
commit b9d1b80f6a
2 changed files with 1 additions and 7 deletions

View File

@ -331,10 +331,6 @@ class FullRemoteFileLocation {
} }
} }
void clear_file_reference() {
file_reference_.clear();
}
bool delete_file_reference(Slice bad_file_reference) { bool delete_file_reference(Slice bad_file_reference) {
if (file_reference_ != FileReferenceView::invalid_file_reference() && file_reference_ == bad_file_reference) { if (file_reference_ != FileReferenceView::invalid_file_reference() && file_reference_ == bad_file_reference) {
file_reference_ = FileReferenceView::invalid_file_reference().str(); file_reference_ = FileReferenceView::invalid_file_reference().str();

View File

@ -2726,9 +2726,7 @@ string FileManager::get_persistent_id(const FullGenerateFileLocation &location)
} }
string FileManager::get_persistent_id(const FullRemoteFileLocation &location) { string FileManager::get_persistent_id(const FullRemoteFileLocation &location) {
auto location_copy = location; auto binary = serialize(location);
location_copy.clear_file_reference();
auto binary = serialize(location_copy);
binary = zero_encode(binary); binary = zero_encode(binary);
binary.push_back(static_cast<char>(narrow_cast<uint8>(Version::Next) - 1)); binary.push_back(static_cast<char>(narrow_cast<uint8>(Version::Next) - 1));