Not showing icon for file when DefaultIcon registry value starts with space.

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Ilya
Junior Member
Junior Member
Posts: 3
Joined: 2018-12-08, 22:26 UTC

Not showing icon for file when DefaultIcon registry value starts with space.

Post by *Ilya »

After changing default program for .sln files from VS to Rider icon changed not to Rider icon, but default exe icon instead. Digging registry I noticed that value for default icon for Rider starts with space:

Code: Select all

[HKEY_CLASSES_ROOT\Rider2018.2\DefaultIcon]
@=" C:\\Program Files\\JetBrains\\JetBrains Rider 2018.2.3\\bin\\rider64.exe,0"
Removing space fixed icon. And bringing space back breaks icon again.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Re: Not showing icon for file when DefaultIcon registry value starts with space.

Post by *ts4242 »

Confirmed! (tested with .png files)
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Not showing icon for file when DefaultIcon registry value starts with space.

Post by *HolgerK »

Also TC may be modified to ignore leading spaces in absolute paths, the better way would be to report the wrong registry value to Jetbrains:
https://rider-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=97145

Regards
Holger
Make our planet great again
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Not showing icon for file when DefaultIcon registry value starts with space.

Post by *Horst.Epp »

As HolgerK said report the problem to the originator of the problem.
It doesn't make sense to modify TC for such an error which is in no way a common or serious problem.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Ilya
Junior Member
Junior Member
Posts: 3
Joined: 2018-12-08, 22:26 UTC

Re: Not showing icon for file when DefaultIcon registry value starts with space.

Post by *Ilya »

Well, it's not a problem for Windows Explorer. It handles any number of leading and trailing white spaces. So it's rather confusing to see TC and Explorer behaves differently in the same situation. Also it seems like a common practice to ignore spaces in file and folder names for MS:

https://support.microsoft.com/en-us/help/2829981/support-for-whitespace-characters-in-file-and-folder-names-for-windows
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Not showing icon for file when DefaultIcon registry value starts with space.

Post by *HolgerK »

Yes, one may create files or folders with leading white spaces also this is a very bad practice because some programs will fail to address these file as relative path if they trim the spaces away by default.
BUT: you can't create a drive letter starting with space.
This    is    not    a    valid    absolute    path!

Regards
Holger
Make our planet great again
Ilya
Junior Member
Junior Member
Posts: 3
Joined: 2018-12-08, 22:26 UTC

Re: Not showing icon for file when DefaultIcon registry value starts with space.

Post by *Ilya »

Yes, actually path with space(s) before device name is not fully qualified path. And pretty much anything will fail trying to address file using such path. It seems that Windows Explorer just trimming registry value.
Post Reply