Bug 455589

Summary: Dolphin doesn't show custom folder icons for SMB shares
Product: [Applications] dolphin Reporter: Matt <mattyhoffman7>
Component: view-engine: icons modeAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: ckardaris, dolphin-bugs-null, meven
Priority: NOR    
Version First Reported In: 22.04.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Matt 2022-06-19 07:21:22 UTC
SUMMARY
Changing the folder icon for a folder inside an SMB share has no effect despite a .directory file being created.


STEPS TO REPRODUCE
1. Mount an SMB share
2. Change the icon of a folder in that SMB share
3. Refresh or close and re-open dolphin

OBSERVED RESULT
Folder icons do not update

EXPECTED RESULT
Custom folder icons should be visible

SOFTWARE/OS VERSIONS
Operating System: Artix Linux
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Kernel Version: 5.18.2-artix1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4770K CPU @ 3.50GHz
Memory: 19.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6900 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: Z87X-UD3H

ADDITIONAL INFORMATION
The SMB shares that I have are mounted using /etc/fstab and cifs type. Not sure if this bug occurs for SMB4K mounted shares. I have also raised the limit on remote previews, to no affect.
Comment 1 Méven 2025-10-23 13:59:48 UTC
Do you use smb:// url or a fstab/mount ?

> 2. Change the icon of a folder in that SMB share
How did you try to do it (which way, which dialog/menu)

I tested the `smb://` and the UI doesn't let you change the folders (neither, context menu, new folder or folder property).

Currently the custom icons are save to the hidden directory .directory, that won't be hidden on windows and "pollute" the file list.

We are planning to remove this .directory file to a filesystem extended attribute instead.

So the issue might be that the feature is exposed despite being on a samba share.
Comment 2 Constantine-D. Kardaris 2025-10-25 19:03:43 UTC
This is duplicate of https://bugs.kde.org/show_bug.cgi?id=507493

SMB reports zero-sized directories and so .directory files are ignored by frameworks/KIO.

I verified that removing the relevant size check KIO/dolphin respect .directory in SMB shares.
Comment 3 Méven 2025-10-27 11:08:48 UTC
(In reply to Constantine-D. Kardaris from comment #2)
> This is duplicate of https://bugs.kde.org/show_bug.cgi?id=507493
> 
> SMB reports zero-sized directories and so .directory files are ignored by
> frameworks/KIO.
> 
> I verified that removing the relevant size check KIO/dolphin respect
> .directory in SMB shares.

Then that's an easy MR.
It would need some nuance this 0 size check is there for some reason presumably.