]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix issue with DP_FS_BASEDIR on Mac
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 3 Jul 2006 07:31:55 +0000 (07:31 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 3 Jul 2006 07:31:55 +0000 (07:31 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6496 d7cf8633-e32d-0410-b094-e92efae38249

fs.c

diff --git a/fs.c b/fs.c
index f982e226bad6a218ec4d522cf6a752ae3cf3c4f3..ab981f5e6cc2841298d85a1462c0122abbf0856b 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -1066,13 +1066,13 @@ void FS_Init (void)
 // If the base directory is explicitly defined by the compilation process
 #ifdef DP_FS_BASEDIR
        strcpy(fs_basedir, DP_FS_BASEDIR);
-
 #else
        strcpy(fs_basedir, "");
+#endif
 
 #ifdef MACOSX
        // FIXME: is there a better way to find the directory outside the .app?
-       if (strstr(com_argv[0], ".app/"))
+       if (!fs_basedir[0] && strstr(com_argv[0], ".app/"))
        {
                char *split;
 
@@ -1082,7 +1082,6 @@ void FS_Init (void)
                strlcpy(fs_basedir, com_argv[0], sizeof(fs_basedir));
                fs_basedir[split - com_argv[0]] = 0;
        }
-#endif
 #endif
 
        PK3_OpenLibrary ();