[Bf-blender-cvs] [60ad008] blender-v2.76-release: Fix T46531: Cannot use % in filenames.
Bastien Montagne
noreply at git.blender.org
Thu Oct 29 12:07:27 CET 2015
Commit: 60ad008162be9c32ab337061f29db878b733d12e
Author: Bastien Montagne
Date: Sun Oct 18 18:51:08 2015 +0200
Branches: blender-v2.76-release
https://developer.blender.org/rB60ad008162be9c32ab337061f29db878b733d12e
Fix T46531: Cannot use % in filenames.
Same case as with space char really, one should not use those special chars in
filenames, but they are globally supported by all current FS/OS, so no real reason
to enforce that behvior on users here.
To be backported to 'a' release.
===================================================================
M source/blender/blenlib/intern/path_util.c
===================================================================
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 951c88e..7c3af302 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -429,6 +429,7 @@ void BLI_cleanup_file(const char *relabase, char *path)
* \note Space case ' ' is a bit of an edge case here - in theory it is allowed, but again can be an issue
* in some cases, so we simply replace it by an underscore too (good practice anyway).
* REMOVED based on popular demand (see T45900).
+ * Percent '%' char is a bit same case - not recommended to use it, but supported by all decent FS/OS around...
*
* \note On Windows, it also ensures there is no '.' (dot char) at the end of the file, this can lead to issues...
*
@@ -439,7 +440,7 @@ bool BLI_filename_make_safe(char *fname)
{
const char *invalid = "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
- "/\\?%*:|\"<>";
+ "/\\?*:|\"<>";
char *fn;
bool changed = false;
More information about the Bf-blender-cvs
mailing list