BLI_path_utils: fix/enhance BLI_filename_make_safe(), add BLI_path_make_safe().
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 14 Jul 2015 16:42:22 +0000 (18:42 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 14 Jul 2015 16:57:38 +0000 (18:57 +0200)
commitd7b9202567199cb769305d4037eefbba71dda3f9
tree6bd69218d728e9e85762d8e3183a8431010ea349
parentd0c5eac4b7e5dc3173ee354f6f0afdd0d1e078dc
BLI_path_utils: fix/enhance BLI_filename_make_safe(), add BLI_path_make_safe().

BLI_filename_make_safe had several issues:
* Would replace all dots ('.'), not a great idea since it would break extensions.
* Was not checking for 'control' ASCII chars (though unlikely, better to be safe here).
* Win32 only: was not checking for forbidden names (con, aux, ltp0, com0, etc.).

New BLI_path_make_safe() simply checks each path's item with BLI_filename_make_safe().
source/blender/blenlib/BLI_path_util.h
source/blender/blenlib/intern/path_util.c