From 697726468e52ce18deb4e75b92bbeaeb3af09518 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Nov 2011 07:35:28 +0000 Subject: [PATCH] fix for own error, BLI_replace_extension would strip the filename if there wasn't already an extension. --- source/blender/blenlib/intern/path_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 7c7d51e5907..08d9dfaeb9e 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1414,6 +1414,10 @@ int BLI_replace_extension(char *path, size_t maxlen, const char *ext) } } + if (path[a] != '.') { + a= path_len; + } + if(a + ext_len >= maxlen) return 0;