Shared thumbnails not displayed for broken symlink
When for the name of a broken symlink a thumbnail is available, it is not shown in Thunar. Please consider grabbing the thumbnails from .sh_thumbnails even for broken symlinks -- they were probably put there for a reason.
(For context, this is useful in combination with git-annex, which stores and on demand evicts large stored files from local disk, but can easily be made to keep files in .sh_thumbnails around with higher priority).
I'm not sure precisely where this needs to be addressed; I've traced tumbler in its tumbler_file_info_load function, and it was called with info->uri
containing the symlink (not the target) for good symlinks and called also for regular files, but not at all for broken symlinks.
My current hunch is that tumbler does not advertise support for inode/symlink (which in general is a good thing) and thus thunar does not ask. If that is the case, advertising inode/symlink support may be good enough a workaround for what could otherwise only be resolved if the some abstraction barriers were torn down. (It'd cause tumbler to be called for all broken symlinks, but unless shared thumbnails are provided, tumbler would just err back quickly).
If you have better ideas as to the cause, please reassign or give me directions.
On whether the desired is the right behavior, two points that may suffice:
-
A symlink and broken symbol should still be shown. (Oddly, in the current nightly build, I don't see the "broken" symbol). The latter should be indication enough for the user to see there's something wrong with the file.
-
The thumbnail spec gives leisure for this case:
There are certain circumstances where a program can't or don't want to update a thumbnail (eg. within a history view of your recently edited files). This is legally but it should be indicated to the user that an thumbnail is maybe outdated or not even checked for modifications.
I think that the broken symbol qualifies for indication, and the file being unreadable for "can't update a thumbnail".