]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/vfspk3/vfs.cpp
more compile fail
[xonotic/netradiant.git] / plugins / vfspk3 / vfs.cpp
index e10c1ce636c1a5f9417883267833dee3dd7e684c..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,11 +316,10 @@ void InitDirectory(const char* directory, ArchiveModules& archiveModules)
 
   for(j = 0; j < g_numForbiddenDirs; ++j)
   {
-    printf("match against %s?\n", g_strForbiddenDirs[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;
-    printf("not matched\n");
   }
   if(j < g_numForbiddenDirs)
   {