From 488885550e472c30eea2308d2f27be633cb69bcc Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Wed, 23 Aug 2023 22:30:14 -0400 Subject: fix gfile sort and symlink warnings w glib2.76 or later *Use code borrowed from Nemo --- libcaja-private/caja-directory-async.c | 2 +- libcaja-private/caja-file.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'libcaja-private') diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c index 8a9c021c..e9643615 100644 --- a/libcaja-private/caja-directory-async.c +++ b/libcaja-private/caja-directory-async.c @@ -3821,7 +3821,7 @@ static gboolean is_trusted_system_desktop_file (GFile *file) return FALSE; } - target = g_file_info_get_symlink_target (info); + target = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET); if (!target) { goto done; } diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c index 1ebfc71e..ddbdb1f1 100644 --- a/libcaja-private/caja-file.c +++ b/libcaja-private/caja-file.c @@ -2398,7 +2398,7 @@ update_info_internal (CajaFile *file, } file->details->size_on_disk = size_on_disk; - sort_order = g_file_info_get_sort_order (info); + sort_order = g_file_info_get_attribute_int32 (info, G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER); if (file->details->sort_order != sort_order) { changed = TRUE; } @@ -2453,7 +2453,8 @@ update_info_internal (CajaFile *file, file->details->thumbnailing_failed = thumbnailing_failed; } - symlink_name = g_file_info_get_symlink_target (info); + symlink_name = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET); + if (eel_strcmp (file->details->symlink_name, symlink_name) != 0) { changed = TRUE; g_free (file->details->symlink_name); -- cgit v1.2.1