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>2016-05-23 18:45:44 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-05-23 18:45:44 +0300
commitaf4a04eae07184f7437a8c51858a4ddb8a2e3e4c (patch)
tree564d01f6d2ef601ebbf8fc9bbcc793ceddd159df /source/blender/makesrna/intern/rna_object_force.c
parenta6b218af2e62f5f0b37c05458072c7a4fb8ebf3d (diff)
Fix T48487: Physics cache names allow (back)slashes, which breaks its handling.
For now, just validate new pointcache names as if they were filnames. Ideal solution would be rather to validate names in `ptcache_filename()`, but it would likely break some existing caches - and we'd also have to ensure we still have uniqueness of name after it has been cleaned up, wich would not be trivial at this stage. So let's go for simple solution for now, especially since this part of code is to be fully rewritten in 2.8...
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index ed765f1b5c6..a8d8407fe74 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -199,6 +199,8 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
}
if (use_new_name) {
+ BLI_filename_make_safe(cache->name);
+
if (pid2 && cache->flag & PTCACHE_DISK_CACHE) {
char old_name[80];
char new_name[80];