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 committed Feb 2, 2024
1 parent 42307fe commit 4888855
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 @@ -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;
}
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 @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

3 comments on commit 4888855

@raveit65
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukefromdc
travis-Ci is broken!
https://app.travis-ci.com/github/mate-desktop/caja?serverType=git
Please update 1.26 branch with a commit like this e2a2786
before you cherry-pick commits to 1.26 branch

I mentioned this little ToDo when i fixed CI building last week....... sigh

@lukefromdc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pushed 6699d30
which is a cherrypick of e2a2786 to fix CI.

@lukefromdc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.