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...
This commit is contained in:
parent
a6b218af2e
commit
af4a04eae0
Notes:
blender-bot
2023-02-14 07:52:39 +01:00
Referenced by issue #48487, Physics cache names allow (back)slashes, which breaks its handling.
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue