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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-07-14 19:48:51 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-07-14 19:57:38 +0300
commit8a17918555d9ba8c7f420deda35b77ffa8d3850e (patch)
treeb5cbdc6c21ebd53bbf66e80fdac880a203a20e3f /source/blender/editors/space_file/file_draw.c
parentd7b9202567199cb769305d4037eefbba71dda3f9 (diff)
Fix T45424: Blender able to create folders with invalid characters at the end of the name.
In fact, filebrowser was not making any checks for invalid file/dir names here! Added checks in the three places that should be protected: * Renaming. * Creating dirs. * Typing in filename field.
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r--source/blender/editors/space_file/file_draw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index be602e7330e..78638334338 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -428,6 +428,7 @@ static void renamebutton_cb(bContext *C, void *UNUSED(arg1), char *oldname)
BLI_make_file_string(G.main->name, orgname, sfile->params->dir, oldname);
BLI_strncpy(filename, sfile->params->renameedit, sizeof(filename));
+ BLI_filename_make_safe(filename);
BLI_make_file_string(G.main->name, newname, sfile->params->dir, filename);
if (!STREQ(orgname, newname)) {