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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user