]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/vfspk3/vfs.cpp
more compile fail
[xonotic/netradiant.git] / plugins / vfspk3 / vfs.cpp
index b47942ba9149e2394fdaafc35cc2783b47c26902..bea0adb44079912412f58a091de3567d92a753e9 100644 (file)
@@ -60,6 +60,7 @@ ArchiveModules& FileSystemQ3API_getArchiveModules();
 #include "stream/stringstream.h"
 #include "os/path.h"
 #include "moduleobservers.h"
+#include "filematch.h"
 
 
 #define VFS_MAXDIRS 64
@@ -315,8 +316,9 @@ void InitDirectory(const char* directory, ArchiveModules& archiveModules)
 
   for(j = 0; j < g_numForbiddenDirs; ++j)
   {
-    if(!string_compare_nocase_upper(directory, g_strForbiddenDirs[j])
-    || (string_length(directory) > string_length(g_strForbiddenDirs[j]) && directory[string_length(directory) - string_length(g_strForbiddenDirs[j]) - 1] == '/' && !string_compare_nocase_upper(directory + string_length(directory) - string_length(g_strForbiddenDirs[j]), g_strForbiddenDirs[j])))
+    const char *p = strrchr(directory, '/');
+    p = (p ? (p+1) : directory);
+    if(matchpattern(p, g_strForbiddenDirs[j], TRUE))
       break;
   }
   if(j < g_numForbiddenDirs)