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-29 20:47:22 +0300
committerTon Roosendaal <ton@blender.org>2011-01-29 20:47:22 +0300
commitff58fc3e86dd00295cc55caf835dc6ac6d22ba96 (patch)
tree97300bbba3a3133acadbca65fb5eb57f8949bb1b /source/blender/blenlib
parentaef43569094a7546c91715fe1ac4efa0bbbe0c83 (diff)
Todo list fix: .blend backup files are recognized as such now;
for drop inside Blender window and icons. (.blend1, .blend2, etc).
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/path_util.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 0e46a9df4fc..f449c2be437 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1315,6 +1315,7 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir,
BLI_clean(string);
}
+/* if ext is .blend*, it doesn't compare last char */
int BLI_testextensie(const char *str, const char *ext)
{
short a, b;
@@ -1325,10 +1326,12 @@ int BLI_testextensie(const char *str, const char *ext)
if(a==0 || b==0 || b>=a) {
retval = 0;
- } else if (BLI_strcasecmp(ext, str + a - b)) {
- retval = 0;
- } else {
- retval = 1;
+ }
+ else {
+ if(ext[b-1]=='*')
+ retval= 0==BLI_strncasecmp(ext, str + a - b, b-1);
+ else
+ retval= 0==BLI_strcasecmp(ext, str + a - b);
}
return (retval);