Allow directories to be picked up by GetPathToG.

This commit is contained in:
Glenn Maynard
2003-10-31 02:06:48 +00:00
parent 187b1206d5
commit b4cc7c24df
+5 -1
View File
@@ -201,7 +201,7 @@ try_element_again:
static const char *masks[NUM_ELEMENT_CATEGORIES][12] = { static const char *masks[NUM_ELEMENT_CATEGORIES][12] = {
{ "", NULL }, { "", NULL },
{ "ini", NULL }, { "ini", NULL },
{ "actor", "sprite", "png", "jpg", "bmp", "gif","avi", "mpg", "mpeg", "txt", NULL}, { "actor", "sprite", "png", "jpg", "bmp", "gif","avi", "mpg", "mpeg", "txt", "", NULL},
{ "png", NULL }, { "png", NULL },
{ "mp3", "ogg", "wav", NULL }, { "mp3", "ogg", "wav", NULL },
{ "sm", NULL }, { "sm", NULL },
@@ -215,6 +215,10 @@ try_element_again:
for( int i = 0; asset_masks[i]; ++i ) for( int i = 0; asset_masks[i]; ++i )
{ {
/* No extension means directories. */
if( asset_masks[i][0] == 0 && !IsADirectory(asPaths[p]) )
continue;
if( ext == asset_masks[i] ) if( ext == asset_masks[i] )
{ {
asElementPaths.push_back( asPaths[p] ); asElementPaths.push_back( asPaths[p] );