Infinite recursion with symlinked file ending in ".desktop"
Thunar started segfaulting for me at startup after the latest update to 4.19.1. I bisected the issue back to 00c0bc156d656410c86397b33932cf584d0648aa and determined that it was recursing infinitely on a symlink named `.profile.desktop`. Here's a gdb trace of the last two loops: ``` #8 0x000055b63d4ef57f in thunar_file_load.constprop.0 (file=file@entry=0x7facbb799d00, error=error@entry=0x0, cancellable=0x0) at /usr/src/debug/xfce-base/thunar-4.19.1/thunar-4.19.1/thunar/thunar-file.c:1189 #9 0x000055b63d49a45b in thunar_file_get (gfile=gfile@entry=0x7facbb799b00, error=error@entry=0x0) at /usr/src/debug/xfce-base/thunar-4.19.1/thunar-4.19.1/thunar/thunar-file.c:1267 #10 0x000055b63d49c76c in thunar_file_can_execute (file=file@entry=0x7facbb7995b0, ask_execute=ask_execute@entry=0x0) at /usr/src/debug/xfce-base/thunar-4.19.1/thunar-4.19.1/thunar/thunar-file.c:3009 #11 0x000055b63d49ca1a in thunar_file_info_reload (file=0x7facbb7995b0, cancellable=0x0) at /usr/src/debug/xfce-base/thunar-4.19.1/thunar-4.19.1/thunar/thunar-file.c:991 #12 0x000055b63d4ef5ea in thunar_file_load.constprop.0 (file=file@entry=0x7facbb7995b0, error=error@entry=0x0, cancellable=0x0) at /usr/src/debug/xfce-base/thunar-4.19.1/thunar-4.19.1/thunar/thunar-file.c:1211 #13 0x000055b63d49a45b in thunar_file_get (gfile=gfile@entry=0x7facbb799460, error=error@entry=0x0) at /usr/src/debug/xfce-base/thunar-4.19.1/thunar-4.19.1/thunar/thunar-file.c:1267 #14 0x000055b63d49c76c in thunar_file_can_execute (file=file@entry=0x7facbb798eb0, ask_execute=ask_execute@entry=0x0) at /usr/src/debug/xfce-base/thunar-4.19.1/thunar-4.19.1/thunar/thunar-file.c:3009 #15 0x000055b63d49ca1a in thunar_file_info_reload (file=0x7facbb798eb0, cancellable=0x0) at /usr/src/debug/xfce-base/thunar-4.19.1/thunar-4.19.1/thunar/thunar-file.c:991 ``` I'm not entirely sure I understand the changes introduced in 00c0bc156d656410c86397b33932cf584d0648aa - as far as I can see `thunar_g_file_resolve_symlink` is not actually resolving symbolic links anymore, but rather just reporting a symlink's relative path. Because of this, Thunar recurses infinitely when checking for executability of a .desktop file. As far as I understand the loop goes: 1) [thunar_file_info_reload](https://gitlab.xfce.org/xfce/thunar/-/blob/master/thunar/thunar-file.c?ref_type=heads#L991): checking whether a file is a desktop file and whether it's executable 2) [thunar_file_can_execute](https://gitlab.xfce.org/xfce/thunar/-/blob/master/thunar/thunar-file.c?ref_type=heads#L3009): `thunar_file_can_execute` determines that the file is a symlink, and then has `thunar_g_file_resolve_symlink` report the relative path to the same file 3) `thunar_file_get` triggers on the same file, calling `thunar_file_load` and then `thunar_file_info_reload`.
issue