filename filtering for media files

No more spaces in filenames. The only allowed chars are a-z, A-Z, 0-9 and
"-_.()".

An exception are texture filenames, which may also have a prefix command
like "<decal>" included.

Also fixed some memory leaks in media download.
This commit is contained in:
ac-stef
2015-05-18 14:46:03 +02:00
parent e318ecd68e
commit 786a6cdce1
8 changed files with 71 additions and 29 deletions
+1
View File
@@ -211,6 +211,7 @@ bool extractzipfile(ziparchive *a, zipfile *f, const char *name);
bool fitspackage(char *filename, int type)
{
if(strchr(filename, ' ')) return false; // refuse all filenames with spaces
char *extension = strrchr(filename, '.');
if(!extension) return false;
++extension;