Error Messages Creating Thumbnail Folders

On the Windows platform there will be some errors printed to the
console if the user's thumbnail cache folder doesn't already exist.
While creating those folders there is an attempt to do so multiple
times and so we get errors when trying to create when exists. This
is caused by paths that have hard-coded forward slashes, which causes
our path processing routines to not work correctly. This patch defines
those paths using platform-varying separator characters.

Differential Revision: https://developer.blender.org/D11505

Reviewed by Brecht Van Lommel
This commit is contained in:
Harley Acheson
2021-06-14 09:16:35 -07:00
parent e9b4de43d8
commit 3de6fe0b3e

View File

@@ -112,13 +112,13 @@ static bool get_thumb_dir(char *dir, ThumbSize size)
#endif
switch (size) {
case THB_NORMAL:
subdir = "/" THUMBNAILS "/normal/";
subdir = SEP_STR THUMBNAILS SEP_STR "normal" SEP_STR;
break;
case THB_LARGE:
subdir = "/" THUMBNAILS "/large/";
subdir = SEP_STR THUMBNAILS SEP_STR "large" SEP_STR;
break;
case THB_FAIL:
subdir = "/" THUMBNAILS "/fail/blender/";
subdir = SEP_STR THUMBNAILS SEP_STR "fail" SEP_STR "blender" SEP_STR;
break;
default:
return 0; /* unknown size */