]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix something Ive broken ofc.
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 14 Feb 2008 20:41:07 +0000 (20:41 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 14 Feb 2008 20:41:07 +0000 (20:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8093 d7cf8633-e32d-0410-b094-e92efae38249

fs.c

diff --git a/fs.c b/fs.c
index ad6e55b50e774a05f7e9eef5bcf87f9c8672996a..648b78601376548c5d174fe3d6ebada71b0bcf63 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -2596,6 +2596,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet)
                }
                else
                {
+                       int searchpathlen = strlen( searchpath->filename );
                        // get a directory listing and look at each name
                        dpsnprintf(netpath, sizeof (netpath), "%s%s", searchpath->filename, basepath);
                        stringlistinit(&dirlist);
@@ -2603,7 +2604,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet)
                        for (dirlistindex = 0;dirlistindex < dirlist.numstrings;dirlistindex++)
                        {
                                const char *direntry = dirlist.strings[dirlistindex];
-                               if (matchpattern(direntry, (char *)pattern, true))
+                               if (matchpattern(direntry + searchpathlen, (char *)pattern, true))
                                {
                                        for (resultlistindex = 0;resultlistindex < resultlist.numstrings;resultlistindex++)
                                                if (!strcmp(resultlist.strings[resultlistindex], direntry))