[mapguide-commits] r1055 - in trunk/MgDev: Common/Foundation/System Server/src/Common/Manager

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jan 16 15:13:54 EST 2007


Author: tonyfang
Date: 2007-01-16 15:13:54 -0500 (Tue, 16 Jan 2007)
New Revision: 1055

Modified:
   trunk/MgDev/Common/Foundation/System/FileUtil.cpp
   trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.cpp
Log:
fix unit test failures
- reverted my RFC2 changes to MgFileUtil::EndsWithExtension
- UnmanagedDataManager.cpp changed to use previous implementation of EndsWithExtension

Modified: trunk/MgDev/Common/Foundation/System/FileUtil.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/FileUtil.cpp	2007-01-16 18:35:22 UTC (rev 1054)
+++ trunk/MgDev/Common/Foundation/System/FileUtil.cpp	2007-01-16 20:13:54 UTC (rev 1055)
@@ -131,6 +131,12 @@
 /// <summary>
 /// Check to see if a file ends in the desired extension
 /// </summary>
+/// <param name="pathname">
+/// path to file name, e.g. "c:\temp\readme.txt"
+/// </param>
+/// <param name="extension">
+/// file extension, e.g. ".txt"
+/// </param>
 ///----------------------------------------------------------------------------
 bool MgFileUtil::EndsWithExtension(CREFSTRING pathname, CREFSTRING extension)
 {
@@ -142,7 +148,7 @@
 
     bool result = false;
     size_t len = extension.length();
-    size_t pos = pathname.find_last_of(L'.') + 1;
+    size_t pos = pathname.find_last_of(L'.');
 
     if (STRING::npos != pos && (pathname.length() == pos + len))
     {

Modified: trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.cpp	2007-01-16 18:35:22 UTC (rev 1054)
+++ trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.cpp	2007-01-16 20:13:54 UTC (rev 1055)
@@ -24,25 +24,25 @@
 // Process-wide MgUnmanagedDataManager
 Ptr<MgUnmanagedDataManager> MgUnmanagedDataManager::sm_unmanagedDataManager = (MgUnmanagedDataManager*)NULL;
 
-const STRING MgUnmanagedDataManager::Sdf                  = L"SDF";
-const STRING MgUnmanagedDataManager::Shp                  = L"SHP";
-const STRING MgUnmanagedDataManager::Dwf                  = L"DWF";
-const STRING MgUnmanagedDataManager::Raster               = L"RASTER";
+const STRING MgUnmanagedDataManager::Sdf                  = L".SDF";
+const STRING MgUnmanagedDataManager::Shp                  = L".SHP";
+const STRING MgUnmanagedDataManager::Dwf                  = L".DWF";
+const STRING MgUnmanagedDataManager::Raster               = L".RASTER";
 const STRING MgUnmanagedDataManager::Odbc                 = L"ODBC";
 const STRING MgUnmanagedDataManager::Folder               = L"FOLDER";
-const STRING MgUnmanagedDataManager::Jpg                  = L"JPG";
-const STRING MgUnmanagedDataManager::Jpeg                 = L"JPEG";
-const STRING MgUnmanagedDataManager::Jpe                  = L"JPE";
-const STRING MgUnmanagedDataManager::Png                  = L"PNG";
-const STRING MgUnmanagedDataManager::Bmp                  = L"BMP";
-const STRING MgUnmanagedDataManager::Cal                  = L"CAL";
-const STRING MgUnmanagedDataManager::Tga                  = L"TGA";
-const STRING MgUnmanagedDataManager::Tif                  = L"TIF";
-const STRING MgUnmanagedDataManager::Tiff                 = L"TIFF";
-const STRING MgUnmanagedDataManager::Sid                  = L"SID";
-const STRING MgUnmanagedDataManager::Ecw                  = L"ECW";
-const STRING MgUnmanagedDataManager::Bil                  = L"BIL";
-const STRING MgUnmanagedDataManager::Mdb                  = L"MDB";
+const STRING MgUnmanagedDataManager::Jpg                  = L".JPG";
+const STRING MgUnmanagedDataManager::Jpeg                 = L".JPEG";
+const STRING MgUnmanagedDataManager::Jpe                  = L".JPE";
+const STRING MgUnmanagedDataManager::Png                  = L".PNG";
+const STRING MgUnmanagedDataManager::Bmp                  = L".BMP";
+const STRING MgUnmanagedDataManager::Cal                  = L".CAL";
+const STRING MgUnmanagedDataManager::Tga                  = L".TGA";
+const STRING MgUnmanagedDataManager::Tif                  = L".TIF";
+const STRING MgUnmanagedDataManager::Tiff                 = L".TIFF";
+const STRING MgUnmanagedDataManager::Sid                  = L".SID";
+const STRING MgUnmanagedDataManager::Ecw                  = L".ECW";
+const STRING MgUnmanagedDataManager::Bil                  = L".BIL";
+const STRING MgUnmanagedDataManager::Mdb                  = L".MDB";
 const STRING MgUnmanagedDataManager::OpenSquareBracket    = L"[";
 const STRING MgUnmanagedDataManager::ClosedSquareBracket  = L"]";
 



More information about the mapguide-commits mailing list