diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-31 04:23:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-31 04:23:42 +0400 |
commit | dc1b3d88b821db1316c85be5f48a60107796b651 (patch) | |
tree | d2996b5c4c21ee4b0d0233483e39094bdb1e80d9 /source/blender/windowmanager/intern/wm_operators.c | |
parent | d3f63bf54cb214fc7cb67b8741dc21fc67b5937a (diff) |
fix [#29098] File save dialog cannot handle extra periods in file name
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 32d4ba857e6..acd5df79982 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1949,7 +1949,10 @@ static int blend_save_check(bContext *UNUSED(C), wmOperator *op) { char filepath[FILE_MAX]; RNA_string_get(op->ptr, "filepath", filepath); - if(BLI_replace_extension(filepath, sizeof(filepath), ".blend")) { + if(!BLO_has_bfile_extension(filepath)) { + /* some users would prefer BLI_replace_extension(), + * we keep getting knit-picking bug reports about this - campbell */ + BLI_ensure_extension(filepath, FILE_MAX, ".blend"); RNA_string_set(op->ptr, "filepath", filepath); return TRUE; } |