misc/physfs/extras/hwpacksmounter.c
branchicegun
changeset 8604 fa44e3218a08
parent 8589 3bb505fc707e
parent 8603 1b58da1fd9bf
child 8606 45f6c35ffd33
--- a/misc/physfs/extras/hwpacksmounter.c	Tue Feb 26 20:37:58 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "hwpacksmounter.h"
-
-PHYSFS_DECL void hedgewarsMountPackages()
-{
-    char ** filesList = PHYSFS_enumerateFiles("/");
-    char **i;
-
-    for (i = filesList; *i != NULL; i++)
-    {
-        char * fileName = *i;
-        int fileNameLength = strlen(fileName);
-        if (fileNameLength > 4)
-            if (strcmp(fileName + fileNameLength - 4, ".hwp") == 0)
-            {
-                const char * dir = PHYSFS_getRealDir(fileName);
-                if(dir)
-                {
-                    char * fullPath = (char *)malloc(strlen(dir) + fileNameLength + 2);
-                    strcpy(fullPath, dir);
-                    strcat(fullPath, "/");
-                    strcat(fullPath, fileName);
-
-                    PHYSFS_mount(fullPath, NULL, 1);
-
-                    free(fullPath);
-                }
-            }
-    }
-
-    PHYSFS_freeList(filesList);
-}