diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-15 11:35:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-15 11:35:28 +0400 |
commit | 697726468e52ce18deb4e75b92bbeaeb3af09518 (patch) | |
tree | 8e6a3ead3f428707cd3d4e0961f4fc42bf527ede | |
parent | ab3295db33ad0152986818cc36f171c52de66482 (diff) |
fix for own error, BLI_replace_extension would strip the filename if there wasn't already an extension.
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |