diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-05 10:26:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-05 10:26:10 +0400 |
commit | 384948908afd5567d6c730a8045a368e8c08e436 (patch) | |
tree | 5fd9e156242aedd9271a8d54ed02b5dc9149fb44 /source/blender/blenkernel/intern/packedFile.c | |
parent | 34233e7fd661dbd378c4e11a1e0d29ed639fbffa (diff) |
patch [#34103] path_util_split_dirstring.patch, path_util_split_dirstring_2.patch, path_util_split_dirstring_3.patch
from Lawrence D'Oliveiro (ldo)
Get rid of BLI_splitdirstring, replace with calls to BLI_split_dirfile, BLI_split_dir_part and BLI_split_file_part as appropriate.
Diffstat (limited to 'source/blender/blenkernel/intern/packedFile.c')
-rw-r--r-- | source/blender/blenkernel/intern/packedFile.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index cd3357a9281..ec13e58d4e0 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -488,11 +488,8 @@ int unpackVFont(ReportList *reports, VFont *vfont, int how) int ret_value = RET_ERROR; if (vfont != NULL) { - BLI_strncpy(localname, vfont->name, sizeof(localname)); - BLI_splitdirstring(localname, fi); - + BLI_split_file_part(vfont->name, fi, sizeof(fi)); BLI_snprintf(localname, sizeof(localname), "//fonts/%s", fi); - newname = unpackFile(reports, vfont->name, localname, vfont->packedfile, how); if (newname != NULL) { ret_value = RET_OK; @@ -513,10 +510,8 @@ int unpackSound(Main *bmain, ReportList *reports, bSound *sound, int how) int ret_value = RET_ERROR; if (sound != NULL) { - BLI_strncpy(localname, sound->name, sizeof(localname)); - BLI_splitdirstring(localname, fi); + BLI_split_file_part(sound->name, fi, sizeof(fi)); BLI_snprintf(localname, sizeof(localname), "//sounds/%s", fi); - newname = unpackFile(reports, sound->name, localname, sound->packedfile, how); if (newname != NULL) { BLI_strncpy(sound->name, newname, sizeof(sound->name)); @@ -541,10 +536,8 @@ int unpackImage(ReportList *reports, Image *ima, int how) int ret_value = RET_ERROR; if (ima != NULL && ima->name[0]) { - BLI_strncpy(localname, ima->name, sizeof(localname)); - BLI_splitdirstring(localname, fi); + BLI_split_file_part(ima->name, fi, sizeof(fi)); BLI_snprintf(localname, sizeof(localname), "//textures/%s", fi); - newname = unpackFile(reports, ima->name, localname, ima->packedfile, how); if (newname != NULL) { ret_value = RET_OK; |