When trying to get a Shellfile from file path using WindowsAPICodePack, (Which I use to get a thumbnail from) it works fine until it gets passed a file with a non-english (specifically Japanese) filename.
using (FolderBrowserDialog SelFolder = new FolderBrowserDialog() )
{
if (SelFolder.ShowDialog() == System.Windows.Forms.DialogResult.OK )
{
Files = Directory.GetFiles(SelFolder.SelectedPath);
Files = Weld(Files, GetSubfolders(SelFolder.SelectedPath));
}
}
Up there is the code I use to get every file from a folder and its subfolders.
ShellFile shellFile = ShellFile.FromFilePath(Path.GetFullPath(Files[Count]));
And then this is the code that throws an exception. It runs fine for over 1000 files, but only stops on Non-English characters. Special characters do not throw an exception. I tried using Path.GetFullPath as it seemed like it might've worked but alas it didn't.
I don't see anyone else with this problem. Is there a fix?