Fix register_remote.
GitOrigin-RevId: 9bb641fe9e356bc314229ef49cf914c3a40586e0
This commit is contained in:
parent
5ce0a44c31
commit
29b14a707f
@ -664,7 +664,15 @@ FileId FileManager::register_remote(const FullRemoteFileLocation &location, File
|
|||||||
data.size_ = size;
|
data.size_ = size;
|
||||||
data.expected_size_ = expected_size;
|
data.expected_size_ = expected_size;
|
||||||
data.remote_name_ = std::move(name);
|
data.remote_name_ = std::move(name);
|
||||||
return register_file(std::move(data), file_location_source, "register_remote", false).move_as_ok();
|
|
||||||
|
auto file_id = register_file(std::move(data), file_location_source, "register_remote", false).move_as_ok();
|
||||||
|
auto url = location.get_url();
|
||||||
|
if (!url.empty()) {
|
||||||
|
auto file_node = get_file_node(file_id);
|
||||||
|
CHECK(file_node);
|
||||||
|
file_node->set_url(url);
|
||||||
|
}
|
||||||
|
return file_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileId FileManager::register_url(string url, FileType file_type, FileLocationSource file_location_source,
|
FileId FileManager::register_url(string url, FileType file_type, FileLocationSource file_location_source,
|
||||||
|
Loading…
Reference in New Issue
Block a user