diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 9a1d4075db9..5d9cb4be166 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -167,12 +167,15 @@ static int screenshot_invoke(bContext *C, wmOperator *op, const wmEvent *event) /* extension is added by 'screenshot_check' after */ char filepath[FILE_MAX]; - BLI_snprintf(filepath, FILE_MAX, "//%s", DATA_("screen")); const char *blendfile_path = BKE_main_blendfile_path_from_global(); if (blendfile_path[0] != '\0') { BLI_strncpy(filepath, blendfile_path, sizeof(filepath)); BLI_path_extension_replace(filepath, sizeof(filepath), ""); /* strip '.blend' */ } + else { + /* As the file isn't saved, only set the name and let the file selector pick a directory. */ + STRNCPY(filepath, DATA_("screen")); + } RNA_string_set(op->ptr, "filepath", filepath); WM_event_add_fileselect(C, op);