From 3de6fe0b3eebb2af66db8051fbb65a49e49a8578 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Mon, 14 Jun 2021 09:16:35 -0700 Subject: 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 --- source/blender/imbuf/intern/thumbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 61bc185eb8d..7b4bf704096 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -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 */ -- cgit v1.2.3