[mapguide-trac] #890: One exception happened with load procedure when Library data file folder doesn't exist.

MapGuide Open Source trac_mapguide at osgeo.org
Fri Mar 13 16:19:17 EDT 2009


#890: One exception happened with load procedure when Library data file folder
doesn't exist.
--------------------------+-------------------------------------------------
 Reporter:  stevenxu      |         Owner:  stevenxu
     Type:  defect        |        Status:  reopened
 Priority:  medium        |     Milestone:  2.2     
Component:  Site Service  |       Version:  2.0.1   
 Severity:  major         |    Resolution:          
 Keywords:                |   External_id:  1200756 
--------------------------+-------------------------------------------------
Comment (by stevedang):

 Nice work Steven! Just a few comments:

 >>> Common/Foundation/System/FileUtil.h:
 - It's nice that you added a new comprehensive/internal method,
 MakeDirectory.
 - Consider renaming it to CreateDirectories for consistency with the other
 overloaded method.

 >>> Common\Foundation\System\FileUtil.cpp:
 Lines 439, 449:
 - Please use 4-space tab/indentation.

 Line 443 - if( path.find_first_of(sm_slash)==0)
 - I'm not sure what this check is for.
 - To make this method complete, it should also handle UCN pathnames
 (though not supported for repositories' locations), and of course work on
 Linux. Otherwise, you will need to document this limitation.
 - To optimize this method, we should check if the path already exists
 before walking through it.

 Line 450:
 - Not needed.

 Line 458-460:
 - Please use size_t's instead of int's.

 Line 467 - if( !PathnameExists(subPath))
 - Not needed because for consistency in both CreateDirectory and
 CreateDirectories methods, the "strict" flag should be only used to
 determine if the method should throw an exception when the path already
 exists.

 >>> Server/src/Services/Tile/TileCache.cpp:
 Line 55 - if (!MgFileUtil::PathnameExists(sm_path))
 - Not needed.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/890#comment:5>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list