mirror of
https://github.com/ostreedev/ostree.git
synced 2025-02-10 17:57:51 +03:00
write_content_object: Don't assume file info has standard::size
The file info object for symlinks might validly not have this attribute. If not, behave as though it was 0, matching what happened with older versions of GLib. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
9e116c0f79
commit
1b29ab7d90
@ -1211,7 +1211,8 @@ write_content_object (OstreeRepo *self,
|
||||
/* Update statistics */
|
||||
g_mutex_lock (&self->txn_lock);
|
||||
self->txn.stats.content_objects_written++;
|
||||
self->txn.stats.content_bytes_written += g_file_info_get_size (file_info);
|
||||
if (g_file_info_has_attribute (file_info, "standard::size"))
|
||||
self->txn.stats.content_bytes_written += g_file_info_get_size (file_info);
|
||||
self->txn.stats.content_objects_total++;
|
||||
g_mutex_unlock (&self->txn_lock);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user