bailey27 / cppcryptfs

cppcryptfs is an implementation of the gocryptfs encrypted overlay filesystem in C++ for Windows.
Other
678 stars 61 forks source link

Thumbnails in Windows 10 not showing #13

Closed FeelsAmazingMan closed 7 years ago

FeelsAmazingMan commented 7 years ago

Thumbnails for pictures and videos are not showing up in explorer with Windows 10(Works on Win7). I tried the dokany mirror sample and it showed thumbnails just fine.

bailey27 commented 7 years ago

Thanks for reporting the issue. I didn't notice it recently because I never use thumbnails view.

Dokany/Mirror had a problem with thumbnails a while back. They fixed it. I could have sworn that fixed it in cppcryptfs too.

I'll investigate.

bailey27 commented 7 years ago

The problem has to do with case-sensitivity.

Please see the section in the readme on case sensitivity https://github.com/bailey27/cppcryptfs/blob/master/README.md

When Windows 10 goes to make the thumbnails, it tries to open the files after converting all the characters in the path to uppercase.

I'm really sure Windows 10 used to not do this a few months ago. I'm pretty sure that it used to respect the case of the path as stored in the fileystem.

If you name the paths and files (including extensions) all uppercase, it works.

Or if you use plaintext filenames, it also works.

I guess I could maintain a cache of recently-used paths, and when windows goes to open a file or directory, I could try to find the path in the cache using a case-insensitive comparison and substitute the path with the correct case for the requested path before encrypting it.

jp341 commented 7 years ago

Windows API is case-insensitive, (although technically NTFS isn't)

See https://support.microsoft.com/en-gb/help/100625/filenames-are-case-sensitive-on-ntfs-volumes

I've often wondered about why boxcryptor/encfs4win etc. allow both upper and lower case in filenames (presumably, to improve density). I assume that only becomes an issue if you have a upper/lower case collision from different files. Mostly likely extremely rare, but still, it's not correct on windows systems.

bailey27 commented 7 years ago

I've implemented a case-insensitive mode. There's now a "Case insensitive" checkbox in the settings tab which enables it. When it's enabled, Windows 10 generates the thumbnails correctly.

Please see README.md for more information

https://github.com/bailey27/cppcryptfs/blob/master/README.md