[Bf-blender-cvs] [01bd22929fd] master: Fix T69221: inconsistent handling of filenames derived from image names.

Bastien Montagne noreply at git.blender.org
Wed Aug 28 17:52:39 CEST 2019


Commit: 01bd22929fdb2c7ec0f564faee46c0ad84d11687
Author: Bastien Montagne
Date:   Wed Aug 28 17:51:40 2019 +0200
Branches: master
https://developer.blender.org/rB01bd22929fdb2c7ec0f564faee46c0ad84d11687

Fix T69221: inconsistent handling of filenames derived from image names.

We did not properly sanitize image data block name when using it to init
file name...

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

M	source/blender/editors/space_image/image_ops.c

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

diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 7ea693f2fd2..e338a450db6 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1773,6 +1773,7 @@ static int image_save_options_init(Main *bmain,
       }
       else {
         BLI_snprintf(opts->filepath, sizeof(opts->filepath), "//%s", ima->id.name + 2);
+        BLI_path_make_safe(opts->filepath);
         BLI_path_abs(opts->filepath, is_prev_save ? G.ima : BKE_main_blendfile_path(bmain));
       }
     }



More information about the Bf-blender-cvs mailing list