Doesn't cache thumbnails (strange conditions)
Moderators: white, Hacker, petermad, Stefan2
Doesn't cache thumbnails (strange conditions)
Steps to reproduce:
1. Enter some folder with JPGs.
2. Switch to thumbnails mode and wait until TC shows thumbs.
3. Re-enter folder. TC tries to load thumbs again (slowly).
Tested in almost fresh Windows XP Professional with SP3 with my installation, with fresh installation, with empty INI etc. TC doesn't create tcthumbs.idb file, it only creates small tcthumbs.db (3 kB).
Also tested on Win7x64 and on virtual Windows XP SP3, all work fine.
Maybe TC needs some libraries that are missing in my clean system? How can I check that?
Compared list of loaded DLLs in Process Explorer (host XP vs virtual XP): no relevant differences found.
1. Enter some folder with JPGs.
2. Switch to thumbnails mode and wait until TC shows thumbs.
3. Re-enter folder. TC tries to load thumbs again (slowly).
Tested in almost fresh Windows XP Professional with SP3 with my installation, with fresh installation, with empty INI etc. TC doesn't create tcthumbs.idb file, it only creates small tcthumbs.db (3 kB).
Also tested on Win7x64 and on virtual Windows XP SP3, all work fine.
Maybe TC needs some libraries that are missing in my clean system? How can I check that?
Compared list of loaded DLLs in Process Explorer (host XP vs virtual XP): no relevant differences found.
- ghisler(Author)
- Site Admin
- Posts: 48166
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thumbnails are only added to the cache if the extraction takes more than 50 milliseconds (measured via GetTickCount function). This is done because otherwise the cache would be filled with thousands of tiny files, which would make the extraction slower than that.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48166
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Maybe the path contains some strange characters, or very long paths? Although the used object file (the same as MS used for .doc and .xls files) supports Unicode, some characters are not supported. Try a very simple short name like TEST.JPG.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
OK, I'll try to copy files to dir in root and test it.
Christian, you're right, it doesn't work just because of a specific path. But it is strange that such path causes bug. The only reason why it doesn't work is exclamation mark in a folder name! E.g. files in E:\Docs\0 folder are cached while files in E:\Docs\! Photo\0 aren't.
Christian, you're right, it doesn't work just because of a specific path. But it is strange that such path causes bug. The only reason why it doesn't work is exclamation mark in a folder name! E.g. files in E:\Docs\0 folder are cached while files in E:\Docs\! Photo\0 aren't.
- ghisler(Author)
- Site Admin
- Posts: 48166
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I couldn't find anything on MSDN, but searching for
"iStorage" "exclamation"
on Google found a reply in a newsgroup thread from someone at Microsoft:
"iStorage" "exclamation"
on Google found a reply in a newsgroup thread from someone at Microsoft:
I didn't know that excamation marks do not work, sorry.Structured Storage has never allowed backslash, forwardslash, colon, or exclamation mark characters in names of streams or storages.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
It is interesting that no one noticed that before... Exclamation mark is a regular name character.
Maybe you can replace exclamation marks with some special character or sequence in storage names? Also it would be good to test for other name characters... It won't break nothing 'cause it doesn't work in past versions but it will work in future ones.
Maybe you can replace exclamation marks with some special character or sequence in storage names? Also it would be good to test for other name characters... It won't break nothing 'cause it doesn't work in past versions but it will work in future ones.
- ghisler(Author)
- Site Admin
- Posts: 48166
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I will try to find a character which could be used as a substitution for exclamation marks.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Maybe it would be better to find some escape character and replace all detected forbidden characters (who knows if there are others exist) with their numeric codes as escaped ascii hex?
E.g. ^ or even character with code 7F (I believe it is quite rare in filenames - but it should be checked for validity) may be used as escape character here. So, exclamation mark will be coded as ^21 or 21.
I checked, chr(7F) character may be used in storages so I think it is the best escape character.
E.g. ^ or even character with code 7F (I believe it is quite rare in filenames - but it should be checked for validity) may be used as escape character here. So, exclamation mark will be coded as ^21 or 21.
I checked, chr(7F) character may be used in storages so I think it is the best escape character.
- ghisler(Author)
- Site Admin
- Posts: 48166
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately this would break compatibility with older versions if the escape character is a regular one. And the "!" seems to be the only disallowed character which is allowed in regular file names, so it could be replaced directly.Maybe it would be better to find some escape character
Sounds good!I checked, chr(7F) character may be used in storages so I think it is the best escape character.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com