Merge pull request #2576 from cgwalters/archive-handle-null-link

This commit is contained in:
Jonathan Lebon authored and GitHub committed 2022-04-04 14:32:52 -04:00
commit 59c6934e74
1 file changed
+6 -2
+6 -2
View File
@@ -146,8 +146,12 @@ file_info_from_archive_entry (struct archive_entry *entry)
g_autoptr(GFileInfo) info = _ostree_stbuf_to_gfileinfo (&stbuf);
if (S_ISLNK (stbuf.st_mode))
g_file_info_set_attribute_byte_string (info, "standard::symlink-target",
archive_entry_symlink (entry));
{
const char *target = archive_entry_symlink (entry);
if (target != NULL)
g_file_info_set_attribute_byte_string (info, "standard::symlink-target",
target);
}
return g_steal_pointer (&info);
}