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

Please report only one bug per message!

Moderators: sheep, Hacker, Stefan2, white

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 » 2018-12-08, 22:36 UTC

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: 2025
Joined: 2004-02-02, 20:08 UTC
Contact:

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

Post by *ts4242 » 2018-12-08, 23:04 UTC

Confirmed! (tested with .png files)

Author of Ultra TC Editors
Please support me

User avatar
HolgerK
Power Member
Power Member
Posts: 5051
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 » 2018-12-09, 09:29 UTC

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: 3227
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 » 2018-12-09, 10:11 UTC

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 10 Home x64 October 2018 Update, Version 1809 (OS Build 17763.379)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.22 x64 and x86, Everything 1.4.1.939 (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 » 2018-12-09, 12:20 UTC

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: 5051
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 » 2018-12-09, 14:03 UTC

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 » 2018-12-09, 15:44 UTC

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