Bug 500347 - feature request: relative path for folder icon files.
Summary: feature request: relative path for folder icon files.
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.12.2
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-18 20:23 UTC by rezad1393
Modified: 2025-08-05 20:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rezad1393 2025-02-18 20:23:09 UTC
right now when I assign an icon to show as folder icon then in the ".directory" file there is this 
[Desktop Entry]
Icon=/fullpath/folder/folder-Logo.svg

so the icon path is saved in full even though I have put icon inside the folder that it is assigned to.

can support for relative path (partial path inside the folder the icon assigned to) be added?

so that the ".directory" file can be like this too
[Desktop Entry]
Icon=./folder-Logo.svg
Comment 1 rezad1393 2025-02-18 20:25:15 UTC
(dear God this bugzilla thing is frustrating, I cant edit my own post and have to add another post)

this way user can move folder between locations and not lose the icon setting of folder.
Comment 2 John 2025-02-19 10:31:43 UTC
I want this too for folder icons!
I hate absolute paths!
But I want it also for .desktop shortcuts.
At the moment for the .desktop files I only manged to have something like:
Exec=~/Scripts/test-script.sh
But not also:
Icon=~/Scripts/test-icon.png

So relative path are not accepted for either Exec or Icon and home expansion is only for Exec.
Ideal would be that relative paths are accepted for both and home expansion works for both too.
Comment 3 rezad1393 2025-02-20 06:00:15 UTC
(In reply to John from comment #2)
> I want this too for folder icons!
> I hate absolute paths!
> But I want it also for .desktop shortcuts.
> At the moment for the .desktop files I only manged to have something like:
> Exec=~/Scripts/test-script.sh
> But not also:
> Icon=~/Scripts/test-icon.png
> 
> So relative path are not accepted for either Exec or Icon and home expansion
> is only for Exec.
> Ideal would be that relative paths are accepted for both and home expansion
> works for both too.

what you described is still absolute path (kinda) 
the ~ will be replaced with your user home directory.
when I say relative path I mean with respect to the folder that desktop file is in.
like ./icon.svg
Comment 4 TraceyC 2025-08-05 19:44:30 UTC
I'll pass this along for consideration
Comment 5 rezad1393 2025-08-05 20:05:45 UTC
(In reply to TraceyC from comment #4)
> I'll pass this along for consideration

thank you.

btw I know moving a folder to another computer and making that computer automatically use a file inside it as icon may have security implications if it is not implemented safely, so I understand if it takes time.