Skip to content

Commit

Permalink
fix gfile sort and symlink warnings w glib2.76 or later
Browse files Browse the repository at this point in the history
*Use code borrowed from Nemo
  • Loading branch information
lukefromdc authored and raveit65 committed Aug 24, 2023
1 parent 4168605 commit 1096ea0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libcaja-private/caja-directory-async.c
Original file line number Diff line number Diff line change
Expand Up @@ -3807,7 +3807,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;
}
Expand Down
5 changes: 3 additions & 2 deletions libcaja-private/caja-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,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;
}
Expand Down Expand Up @@ -2451,7 +2451,8 @@ update_info_internal (CajaFile *file,
file->details->thumbnailing_failed = (thumbnailing_failed != FALSE);
}

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);
Expand Down

0 comments on commit 1096ea0

Please sign in to comment.