Fix T45900: Allow again white spaces in file names.

Should probably be added to 'a' release, should we do one...
This commit is contained in:
Bastien Montagne 2015-10-15 07:44:25 +02:00
parent f823b9ece8
commit 767d3f23b7
Notes: blender-bot 2023-06-26 11:58:59 +02:00
Referenced by issue #46630, New folder with spaces in windows
Referenced by issue #45900, Blender replacing spaces in filename with underscore
1 changed files with 3 additions and 2 deletions

View File

@ -453,6 +453,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).
*
* \note On Windows, it also ensures there is no '.' (dot char) at the end of the file, this can lead to issues...
*
@ -461,9 +462,9 @@ void BLI_cleanup_file(const char *relabase, char *path)
*/
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"
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;