diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-16 21:03:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-16 21:03:10 +0300 |
commit | 4405b01586728c017a538eb00843554a556d402a (patch) | |
tree | ef9151bbe74770b90886a6bd90c228160e18a643 /source/blender/blenlib/intern | |
parent | 57308d838262f3d059b688aa31718af25fb21abb (diff) |
minor adjustment to BLI_uniquename, the last extension is used so "A.B.001" --> "A.B.002" rather then "A.001"
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 8d5df59c4bc..2703de13bd3 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -257,12 +257,12 @@ void BLI_uniquename(ListBase *list, void *vlink, const char defname[], char deli return; /* Strip off the suffix */ - dot = strchr(GIVE_STRADDR(vlink, name_offs), delim); + dot = strrchr(GIVE_STRADDR(vlink, name_offs), delim); if (dot) *dot=0; for (number = 1; number <= 999; number++) { - BLI_snprintf(tempname, 128, "%s%c%03d", GIVE_STRADDR(vlink, name_offs), delim, number); + BLI_snprintf(tempname, sizeof(tempname), "%s%c%03d", GIVE_STRADDR(vlink, name_offs), delim, number); exists = 0; for (link= list->first; link; link= link->next) { |