Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2021-06-14 19:16:35 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-06-14 19:17:27 +0300
commit3de6fe0b3eebb2af66db8051fbb65a49e49a8578 (patch)
tree6d458cd4dd6fc00074de86f834e390ab4c29323b /source/blender/imbuf
parente9b4de43d86332bf85d8119742a39135dc2156b3 (diff)
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
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/thumbs.c6
1 files changed, 3 insertions, 3 deletions
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 */