- 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.
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user