Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-31 04:23:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-31 04:23:42 +0400
commitdc1b3d88b821db1316c85be5f48a60107796b651 (patch)
treed2996b5c4c21ee4b0d0233483e39094bdb1e80d9 /source/blender/windowmanager
parentd3f63bf54cb214fc7cb67b8741dc21fc67b5937a (diff)
fix [#29098] File save dialog cannot handle extra periods in file name
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c5
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;
}