diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-27 02:46:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-27 02:46:06 +0400 |
commit | 5afc38b74c73188f8a38d8f5d7af7cb21e203179 (patch) | |
tree | 43bbaf24f713e2a51bad6d3121c0fb279622087b /source/blender/blenkernel/intern | |
parent | 92fe279fe6903764215f21fab1e40447032056e2 (diff) |
Support more kinds of paths for path re-writing / traversing, patch from Alex Fraser with additions.
this now supports as many types as bpath iterator which its intended to replace.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 308fa828271..f6a5a7f9427 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1477,7 +1477,12 @@ void name_uiprefix_id(char *name, ID *id) void BKE_library_filepath_set(Library *lib, const char *filepath) { - BLI_strncpy(lib->name, filepath, sizeof(lib->name)); + /* in some cases this is used to update the absolute path from the + * relative */ + if (lib->name != filepath) { + BLI_strncpy(lib->name, filepath, sizeof(lib->name)); + } + BLI_strncpy(lib->filepath, filepath, sizeof(lib->filepath)); /* not essential but set filepath is an absolute copy of value which |