Thumbnails also don't show up if:
Reopening this issue as it's shown up again! ๐
With mac, this is fixed with encodeURI(), but it seems (?) Windows can't handle %20 in file names?
Maybe surrounding the path with quotes could help... investigation needed! ๐
Since I have both a Windows and a Mac machine I'll look into it ๐
I'll look into it sometime this week and hopefully solve it without resorting to a hack: filling in the space character in the hub name with a - :trollface:
I identified a second issue which might be easy to fix at the same time - (silly) Windows treats the file string funny, and takes the \ to mean an escape code! ๐ข
This means that a path like D:\Files\... is taken as D: iles\...
(\f being form feed https://en.wikipedia.org/wiki/Page_break)
Encoding the string, or escaping everything should fix both issues! ๐
I'll look into it sometime this week and hopefully solve it without resorting to a hack: filling in the space character in the hub name with a
-:trollface:
This won't work, unless you plan on replacing all spaces in the entire path to the file as well... - :trollface:
Damn, this issue is going to be trickier than I thought - it also includes using a vha file created on one system, on another system... ๐ข
Linux/Mac using / as a path delimiter, but Windows uses \ - This means if you create on one, but then load on another, the saved paths aren't going to match path.sep! ๐
Looking at this, it seems the best option would be to convert Windows \ to / (it's used in the urls anyway), and then we can always assume folders are separated by / - I think this should work for opening files too.
Only problem is any libraries created on Windows will need to be rescanned - thumbnails should be safe! ๐
Are you okay with this?
I think I understand your description of the solution you describe. Could you just clarify what you mean by:
Only problem is any libraries created on Windows will need to be rescanned - thumbnails should be safe!
Meaning that after this change, any .vha file you create on Windows will work fine, but any old .vha file will not?
If so -- no problem at all -- version 2.0 is _all-breaking-changes_ (vha files, settings, etc - as if it's a separate app from before) ๐โโ๏ธ
I was referring to .vha files created using a recent git master (most likely just you and I), should work with a simple meta regen! ๐ Old files won't work anyway - thoughts on #168?
Thanks @cal2195 for diagnosing the problem and recommending a solution ๐
PR #203 should fix things up ๐