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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-27 02:46:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-27 02:46:06 +0400
commit5afc38b74c73188f8a38d8f5d7af7cb21e203179 (patch)
tree43bbaf24f713e2a51bad6d3121c0fb279622087b /source/blender/blenkernel/intern/library.c
parent92fe279fe6903764215f21fab1e40447032056e2 (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/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c7
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