static-delta: Ignore symlinks when computing similar objects
_ostree_delta_compute_similar_objects should not output symlinks. Previously, a symlink in the "from" commit could be matched to a real file in the "to" commit, since nothing was filtering symlinks on the "from" side. This led to failures running the bzdiff algorithm.
This commit is contained in:
parent
4f57aa5b15
commit
43d045309c
|
|
@ -76,20 +76,18 @@ build_content_sizenames_recurse (OstreeRepo *repo,
|
|||
{
|
||||
g_autoptr(GFileInfo) finfo = NULL;
|
||||
|
||||
csizenames = g_new0 (OstreeDeltaContentSizeNames, 1);
|
||||
csizenames->checksum = g_strdup (checksum);
|
||||
|
||||
/* Transfer ownership so things get cleaned up if we
|
||||
* throw an exception below.
|
||||
*/
|
||||
g_hash_table_replace (sizenames_map, csizenames->checksum, csizenames);
|
||||
|
||||
if (!ostree_repo_load_file (repo, checksum,
|
||||
NULL, &finfo, NULL,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
|
||||
if (g_file_info_get_file_type (finfo) != G_FILE_TYPE_REGULAR)
|
||||
continue;
|
||||
|
||||
csizenames = g_new0 (OstreeDeltaContentSizeNames, 1);
|
||||
csizenames->checksum = g_strdup (checksum);
|
||||
csizenames->size = g_file_info_get_size (finfo);
|
||||
g_hash_table_replace (sizenames_map, csizenames->checksum, csizenames);
|
||||
}
|
||||
|
||||
if (!csizenames->basenames)
|
||||
|
|
|
|||
Loading…
Reference in New Issue