lib/pull: Move check for requested content earlier
This is prep for a later patch; currently the logic is unchanged, but we'll need this if we make local imports async. Closes: #982 Approved by: jlebon
This commit is contained in:
parent
d5dd576d20
commit
1782a1c279
|
|
@ -702,13 +702,17 @@ scan_dirtree_object (OtPullData *pull_data,
|
||||||
if (file_is_stored)
|
if (file_is_stored)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* Already have a request pending? If so, move on to the next */
|
||||||
|
if (g_hash_table_lookup (pull_data->requested_content, file_checksum))
|
||||||
|
continue;
|
||||||
|
|
||||||
/* Is this a local repo? */
|
/* Is this a local repo? */
|
||||||
if (pull_data->remote_repo_local)
|
if (pull_data->remote_repo_local)
|
||||||
{
|
{
|
||||||
if (!import_one_local_content_object (pull_data, file_checksum, cancellable, error))
|
if (!import_one_local_content_object (pull_data, file_checksum, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else if (!g_hash_table_lookup (pull_data->requested_content, file_checksum))
|
else
|
||||||
{
|
{
|
||||||
/* In this case we're doing HTTP pulls */
|
/* In this case we're doing HTTP pulls */
|
||||||
g_hash_table_add (pull_data->requested_content, file_checksum);
|
g_hash_table_add (pull_data->requested_content, file_checksum);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue