Jules, I'm terrible sorry, you are right, is just how my crazy brain works... ;-)
Ok, here's the fix, I hope I did it right this time...
juce_FileTreeComponent.cpp
class FileListTreeItem : public TreeViewItem,
private TimeSliceClient,
private AsyncUpdater,
private ChangeListener
{
public:
FileListTreeItem (FileTreeComponent& treeComp,
DirectoryContentsList* const parentContents,
const int indexInContents,
const File& f,
TimeSliceThread& t)
: file(f.getLinkedTarget()), // Changed by WilliamK - before was just: file(f),
owner (treeComp),
parentContentsList (parentContents),
indexInContentsList (indexInContents),
subContentsList (nullptr, false),
thread (t)
{
DirectoryContentsList::FileInfo fileInfo;
if (parentContents != nullptr
&& parentContents->getFileInfo (indexInContents, fileInfo))
{
fileSize = File::descriptionOfSizeInBytes (fileInfo.fileSize);
modTime = fileInfo.modificationTime.formatted ("%d %b '%y %H:%M");
isDirectory = fileInfo.isDirectory;
}
else
{
isDirectory = true;
}
if (f.isLink() && f.getLinkedTarget().isDirectory()) isDirectory = true; // Added by WilliamK
}
(...)