diff options
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 20bbfbbf343..88f67def30a 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1253,13 +1253,8 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, /* check for empty path */ if (guess_path && simopts->filepath[0] == 0) { - if ((G.ima[0] == '/') && (G.ima[1] == '/') && (G.ima[2] == '\0')) { - BLI_strncpy(simopts->filepath, "//untitled", FILE_MAX); - } - else { - BLI_strncpy(simopts->filepath, G.ima, FILE_MAX); - } - BLI_path_abs(simopts->filepath, G.main->name); + BLI_snprintf(simopts->filepath, sizeof(simopts->filepath), "//%s", ima->id.name + 2); + BLI_path_abs(simopts->filepath, STREQ(G.ima, "//") ? G.main->name : G.ima); } /* color management */ |