[Bf-blender-cvs] [715c86d9e58] master: Fix T101231: Console flooded with warnings when fluid type is Domain

Germano Cavalcante noreply at git.blender.org
Tue Sep 27 15:24:24 CEST 2022


Commit: 715c86d9e58f44ed078dd61c1fed45739bf65723
Author: Germano Cavalcante
Date:   Tue Sep 27 10:11:54 2022 -0300
Branches: master
https://developer.blender.org/rB715c86d9e58f44ed078dd61c1fed45739bf65723

Fix T101231: Console flooded with warnings when fluid type is Domain

Although rB67e23b4b2967 turned the problem more recurrent, the warning
messages in the console always appear when `BKE_fluid_cache_free_all`
is called.

This is because of a bug in `BLI_filelist_dir_contents` as this function
calls `BLI_strdupcat` instead of `BLI_join_dirfile`

NOTE: Other places in Blender avoid this problem by making sure to add
a `SEP_STR` to the end of the directory.

Differential Revision: https://developer.blender.org/D16043

===================================================================

M	source/blender/blenlib/intern/BLI_filelist.c

===================================================================

diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c
index 37636ef1cf1..4e532f90fb5 100644
--- a/source/blender/blenlib/intern/BLI_filelist.c
+++ b/source/blender/blenlib/intern/BLI_filelist.c
@@ -174,10 +174,10 @@ static void bli_builddir(struct BuildDirCtx *dir_ctx, const char *dirname)
         struct direntry *file = &dir_ctx->files[dir_ctx->files_num];
         while (dlink) {
           char fullname[PATH_MAX];
+          BLI_join_dirfile(fullname, sizeof(fullname), dirname, dlink->name);
           memset(file, 0, sizeof(struct direntry));
           file->relname = dlink->name;
-          file->path = BLI_strdupcat(dirname, dlink->name);
-          BLI_join_dirfile(fullname, sizeof(fullname), dirname, dlink->name);
+          file->path = BLI_strdup(fullname);
           if (BLI_stat(fullname, &file->s) != -1) {
             file->type = file->s.st_mode;
           }



More information about the Bf-blender-cvs mailing list