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:
authorTon Roosendaal <ton@blender.org>2011-01-30 15:26:16 +0300
committerTon Roosendaal <ton@blender.org>2011-01-30 15:26:16 +0300
commit9d0b8486c89e70b59325b84107394990ae00c3cb (patch)
treefd5891c22fef907f353f50865c2f099695a5fe2c /source/blender/blenlib
parent811897c5ba63a48bfbfde20b15a651e9b5664c59 (diff)
Stupid error in commit to allow .blend1 and .blend2 being dropped in
window caused .blend itself to be not seen :) Mea Maxima Culpa!
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/path_util.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index f449c2be437..06dfd626420 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1319,21 +1319,22 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir,
int BLI_testextensie(const char *str, const char *ext)
{
short a, b;
- int retval;
-
+ int retval= 0;
+
a= strlen(str);
b= strlen(ext);
-
+
if(a==0 || b==0 || b>=a) {
retval = 0;
- }
+ }
else {
- if(ext[b-1]=='*')
- retval= 0==BLI_strncasecmp(ext, str + a - b, b-1);
- else
- retval= 0==BLI_strcasecmp(ext, str + a - b);
+ /* allow .blend1 .blend2 */
+ char *loc= BLI_strcasestr(str+a-b-1, ext);
+
+ if(loc)
+ retval= 1;
}
-
+
return (retval);
}