[mapserver-commits] r8495 - trunk/mapserver/mapscript/php3

svn at osgeo.org svn at osgeo.org
Wed Feb 4 11:24:44 EST 2009


Author: assefa
Date: 2009-02-04 11:24:44 -0500 (Wed, 04 Feb 2009)
New Revision: 8495

Modified:
   trunk/mapserver/mapscript/php3/php_mapscript.c
Log:
fix ms_newmapobjfromstring on windows #2877

Modified: trunk/mapserver/mapscript/php3/php_mapscript.c
===================================================================
--- trunk/mapserver/mapscript/php3/php_mapscript.c	2009-02-04 12:18:09 UTC (rev 8494)
+++ trunk/mapserver/mapscript/php3/php_mapscript.c	2009-02-04 16:24:44 UTC (rev 8495)
@@ -1736,7 +1736,7 @@
     HashTable   *list=NULL;
 
 #if defined(WIN32)
-    char        szPath[MS_MAXPATHLEN], szMapText[MS_MAXPATHLEN];
+    char        szMapText[MS_MAXPATHLEN];
     char        szNewPath[MS_MAXPATHLEN];
 #endif
 
@@ -1762,11 +1762,12 @@
 
     if (pszNewPath)
     {
-        msBuildPath(szNewPath, NULL, pszNewPath);
-        pNewMap = mapObj_newFromString(szMapText, szNewPath);
+        virtual_getcwd(szMapText, MS_MAXPATHLEN TSRMLS_CC);
+        msBuildPath(szNewPath, szMapText, pszNewPath);
+        pNewMap = mapObj_newFromString(pMapText->value.str.val, szNewPath);
     }
     else
-       pNewMap = mapObj_newFromString(szMapText, pszNewPath);
+       pNewMap = mapObj_newFromString(pMapText->value.str.val, pszNewPath);
    
 #else
     pNewMap = mapObj_newFromString(pMapText->value.str.val, pszNewPath);



More information about the mapserver-commits mailing list