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-05-18 10:48:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-18 10:48:52 +0400
commitc92c3758a8e8c29b54d0ac40952fa661ecdf9ca0 (patch)
tree7d8ae89d7b85d7ee41317bb1bef08bc0a1511dce /source/blender/blenlib/intern/bpath.c
parent37178ab0fdb2132dff1d7170613b53a10269607c (diff)
- check paths are not empty strings before making blend file paths absolute or relative.
- when saving blend file with 'Remap Relative' enabled, don't try make paths absolute if the internal filename is invalid. - use case insensitive path comparison on windows when checking if path remapping is needed & for comparing next/prev dirs in the file selector.
Diffstat (limited to 'source/blender/blenlib/intern/bpath.c')
-rw-r--r--source/blender/blenlib/intern/bpath.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c
index 640091b1ab3..63a8df3f73a 100644
--- a/source/blender/blenlib/intern/bpath.c
+++ b/source/blender/blenlib/intern/bpath.c
@@ -699,7 +699,12 @@ void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports) {
/* be sure there is low chance of the path being too short */
char filepath_relative[(FILE_MAXDIR * 2) + FILE_MAXFILE];
-
+
+ if(basedir[0] == '\0') {
+ printf("makeFilesRelative: basedir='', this is a bug\n");
+ return;
+ }
+
BLI_bpathIterator_init(&bpi, bmain, basedir, 0);
while (!BLI_bpathIterator_isDone(bpi)) {
BLI_bpathIterator_getPath(bpi, filepath);
@@ -751,7 +756,10 @@ void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports)
/* be sure there is low chance of the path being too short */
char filepath_absolute[(FILE_MAXDIR * 2) + FILE_MAXFILE];
- BLI_assert(basedir[0] != '\0');
+ if(basedir[0] == '\0') {
+ printf("makeFilesAbsolute: basedir='', this is a bug\n");
+ return;
+ }
BLI_bpathIterator_init(&bpi, bmain, basedir, 0);
while (!BLI_bpathIterator_isDone(bpi)) {