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...
This commit is contained in:
Bastien Montagne 2019-08-28 17:51:40 +02:00
parent d5192d6fd6
commit 01bd22929f
Notes: blender-bot 2023-02-14 10:14:07 +01:00
Referenced by issue #69221, inconsistent handling of filenames derived from image names
1 changed files with 1 additions and 0 deletions

View File

@ -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));
}
}